Class TryGoHereAction
This action is similar to GoHereAction, but considers all involved locations (GetInvolvedLocations()) rather than a single position. The action's PersonLike will then try to pathfind to each one of the positions in a random order, until one of them is valid, and go to it.
public class TryGoHereAction : TryMultipleAction, IGenericDataHolder
- Inheritance
-
JsonTypeSafeGenericDataHolderTryGoHereAction
- Implements
-
IGenericDataHolder
- Inherited Members
-
JsonTypeSafeGenericDataHolder.GetDataKeys()
- Extension Methods
Constructors
TryGoHereAction(ActionInfo)
Creates a new typeless action with the given action information.
[JsonConstructor]
public TryGoHereAction(ActionInfo info)
Parameters
infoActionInfoThe information for this action.
TryGoHereAction(PersonLike, IEnumerable<(Map Map, Point Pos, float Floor)>)
public TryGoHereAction(PersonLike person, IEnumerable<(Map Map, Point Pos, float Floor)> positions)
Parameters
personPersonLikepositionsIEnumerable<(Map Map, Point Pos, float Floor)>
TryGoHereAction(PersonLike, IEnumerable<(Map Map, Vector2 Pos, float Floor)>)
public TryGoHereAction(PersonLike person, IEnumerable<(Map Map, Vector2 Pos, float Floor)> positions)
Parameters
personPersonLikepositionsIEnumerable<(Map Map, Vector2 Pos, float Floor)>
Methods
GetNextActionToTry()
Create and return an instance of the next action to try. If this action completes successfully, this action also completes successfully. If this method returns null, it causes this action to fail.
public override Action GetNextActionToTry()