Class ReadBehavior
An action behavior that is used for any kind of action that involves reading a book or other type of media. A BehaviorAction<T> using this behavior will cause the PersonLike to sit down after using the underlying PickUpOrSpawnBehavior behavior to pick up or spawn the book.
public class ReadBehavior : PickUpOrSpawnBehavior
- Inheritance
-
ReadBehavior
- Inherited Members
- Extension Methods
Constructors
ReadBehavior(BehaviorAction, Func<FurnitureType>, Func<FurnitureType, int[]>, Func<Furniture, bool>)
public ReadBehavior(BehaviorAction action, Func<FurnitureType> itemToSpawn, Func<FurnitureType, int[]> colorsToSpawn = null, Func<Furniture, bool> isValid = null)
Parameters
actionBehaviorActionitemToSpawnFunc<FurnitureType>colorsToSpawnFunc<FurnitureType, int[]>isValidFunc<Furniture, bool>
Properties
FullyInProgress
Whether this action behavior is fully in progress. By default, this is the same as TinyLife.Actions.BehaviorAction.BaseFullyInProgress, which is the fully in progress state of the underlying action.
public override bool FullyInProgress { get; }
Property Value
Methods
CanMultitask(Action)
Return true on this method if this action can be multi-tasked along with the passed Action. A multi-tasking is an action that is currently active along with another action. By default, multi-tasking is disallowed for any action.
public override Action.CanMultitaskResult CanMultitask(Action other)
Parameters
otherActionThe action to multi-task with
Returns
- Action.CanMultitaskResult
Whether this action can be multi-tasked
Initialize()
Initializes this action behavior. This method is automatically called when using BehaviorAction in AndThenInitialize().
public override void Initialize()
OnCompleted(CompletionType)
Causes any activities that this action behavior executes to be marked as completed. This method is automatically called when using BehaviorAction in OnCompleted(CompletionType).
public override void OnCompleted(CompletionType completion)
Parameters
completionCompletionType
Update(GameTime, TimeSpan, float)
Updates this action behavior every update frame. This method is automatically called when using BehaviorAction in AndThenUpdate(GameTime, TimeSpan, float).
public override void Update(GameTime time, TimeSpan passedInGame, float speedMultiplier)