Class WorkAtDeskObjectBehavior
A work at desk object behavior is a ActionBehavior where a person works at an object that is statically attached to a table or standing desk. Note that this behavior differs from GetAndSitDownBehavior in that the object involved in this behavior cannot be picked up or moved by a person. This class is used by ComputerBehavior.
public class WorkAtDeskObjectBehavior : ActionBehavior
- Inheritance
-
WorkAtDeskObjectBehavior
- Derived
- Inherited Members
- Extension Methods
Constructors
WorkAtDeskObjectBehavior(Action)
Creates a new work at desk object behavior with the given settings.
public WorkAtDeskObjectBehavior(Action action)
Parameters
action
ActionThe action that this behavior is acting upon.
WorkAtDeskObjectBehavior(Action, TimeSpan, TimeSpan)
Creates a new work at desk object behavior with the given settings.
public WorkAtDeskObjectBehavior(Action action, TimeSpan workTime, TimeSpan breakTime)
Parameters
action
ActionThe action that this behavior is acting upon.
workTime
TimeSpanThe amount of in-game time that this action's PersonLike shoud look to be working for.
breakTime
TimeSpanThe amount of in-game time that this action's PersonLike should look to be waiting for inbetween working sessions.
Properties
IsWorking
Returns whether this action's PersonLike currently looks to be working, which is displayed by the person's Pose being changed in Update(GameTime, TimeSpan, float).
protected bool IsWorking { get; }
Property Value
Methods
CreateFirstActions()
Creates a set of actions that should be executed before the main Action starts. This method is automatically called when using BehaviorAction in CreateFirstActions().
public override IEnumerable<Action> CreateFirstActions()
Returns
GetNextAction(CompletionType)
Returns the action that should be executed after this action behavior's underlying Action completes. This method is automatically called when using BehaviorAction in GetNextAction(CompletionType).
public override Action GetNextAction(CompletionType completion)
Parameters
completion
CompletionTypeThe underlying action's completion type
Returns
- Action
The action that should be executed next, or null
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)