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(BehaviorAction, string)
Creates a new computer behavior with the given settings.
public ComputerBehavior(BehaviorAction action, string screenContent)
Parameters
actionBehaviorActionThe action that this behavior is acting upon.
screenContentstringThe name of the texture that should be displayed on the computer's screen, which is passed to TurnOn(string).
ComputerBehavior(BehaviorAction, string, TimeSpan, TimeSpan, float)
Creates a new computer behavior with the given settings.
public ComputerBehavior(BehaviorAction action, string screenContent, TimeSpan workTime, TimeSpan breakTime, float varianceFactor = 0)
Parameters
actionBehaviorActionThe action that this behavior is acting upon.
screenContentstringThe name of the texture that should be displayed on the computer's screen, which is passed to TurnOn(string).
workTimeTimeSpanThe amount of in-game time that this action's PersonLike shoud look to be typing for.
breakTimeTimeSpanThe amount of in-game time that this action's PersonLike should look to be waiting for inbetween typing sessions.
varianceFactorfloat
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
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)