Table of Contents

Class TryGoHereAction

Namespace
TinyLife.Actions
Assembly
TinyLife.dll

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
JsonTypeSafeGenericDataHolder
TryGoHereAction
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

info ActionInfo

The 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

person PersonLike
positions IEnumerable<(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

person PersonLike
positions IEnumerable<(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()

Returns

Action

The next action to try, or null to give up.