Table of Contents

Class ComputerBehavior

Namespace
TinyLife.Actions.Behaviors
Assembly
Tiny Life.dll

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 Action

The action that this behavior is acting upon.

screenContent string

The 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 Action

The action that this behavior is acting upon.

screenContent string

The name of the texture that should be displayed on the computer's screen, which is passed to TurnOn(string).

workTime TimeSpan

The amount of in-game time that this action's PersonLike shoud look to be typing for.

breakTime TimeSpan

The 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)

Parameters

time GameTime

The game time

passedInGame TimeSpan

The amount of time that has passed since the last update frame

speedMultiplier float

The game speed multiplier, which represents how fast things should happen, which is usually determined by Speed