Class ComputerBehavior
A computer behavior is a WorkAtDeskObjectBehavior that is executed at a computer. Using this behavior automatically turns the computer on (TurnOn(string)) and plays a typing sound.
public class ComputerBehavior : WorkAtDeskObjectBehavior
- Inheritance
-
ComputerBehavior
- Inherited Members
- Extension Methods
Constructors
ComputerBehavior(Action, string)
Creates a new computer behavior with the given settings.
public ComputerBehavior(Action action, string screenContent)
Parameters
action
ActionThe action that this behavior is acting upon.
screenContent
stringThe name of the texture that should be displayed on the computer's screen, which is passed to TurnOn(string).
ComputerBehavior(Action, string, TimeSpan, TimeSpan)
Creates a new computer behavior with the given settings.
public ComputerBehavior(Action action, string screenContent, TimeSpan workTime, TimeSpan breakTime)
Parameters
action
ActionThe action that this behavior is acting upon.
screenContent
stringThe name of the texture that should be displayed on the computer's screen, which is passed to TurnOn(string).
workTime
TimeSpanThe amount of in-game time that this action's PersonLike shoud look to be typing for.
breakTime
TimeSpanThe amount of in-game time that this action's PersonLike should look to be waiting for inbetween typing sessions.
Methods
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
completion
CompletionType
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)