WorkAtDeskObjectAction - Ellpeck/TinyLifeExampleMod Wiki

Tiny Life


WorkAtDeskObjectAction Class

A work at desk object action is an action where a person works at an object that is statically attached to a table or standing desk.
Note that this class differs from GetAndSitDownAction in that the object involved in this action cannot be picked up or moved by a person.
This class is used by ComputerAction.

public abstract class WorkAtDeskObjectAction : TinyLife.Actions.MultiAction

Inheritance System.Object 🡒 MLEM.Misc.GenericDataHolder 🡒 Action 🡒 MultiAction 🡒 WorkAtDeskObjectAction



WorkAtDeskObjectAction.WorkAtDeskObjectAction(ActionType, ActionInfo) Constructor

Creates a new action from the given ActionType

protected WorkAtDeskObjectAction(TinyLife.Actions.ActionType type, TinyLife.Actions.ActionInfo info);


type ActionType
The type to create this action from

info ActionInfo
The information for this action


WorkAtDeskObjectAction.AndThenUpdate(GameTime, TimeSpan, GameSpeed) Method

MultiAction version of Update(GameTime, TimeSpan, GameSpeed).
This method is called every update frame while the main action is active.
By default, only MainElapsedTime is increased.

protected override void AndThenUpdate(Microsoft.Xna.Framework.GameTime time, System.TimeSpan passedInGame, TinyLife.GameSpeed speed);


time Microsoft.Xna.Framework.GameTime
The current game time

passedInGame System.TimeSpan
The amount of time that has passed, in game time

speed GameSpeed
The game's speed

WorkAtDeskObjectAction.CreateFirstActions() Method

Return a set of actions that should be executed before this action.
Even if the yield statement is used, all actions will be collected into a list at the start of this action's invocation.
If no action gets returned in this function, this action fails.
If a null action is returned as the first item, no first actions will be executed.

protected override System.Collections.Generic.IEnumerable<TinyLife.Actions.Action> CreateFirstActions();


A set of actions that sohuld run before this action

WorkAtDeskObjectAction.GetNextAction(CompletionType) Method

Returns an action that should be queued up immediately after this action completes.
The queued up action is immediately started in the slot that this action occupied.
Can be null, and is null by default.

public override TinyLife.Actions.Action GetNextAction(TinyLife.Actions.Action.CompletionType completion);


completion CompletionType
The type that this action completed with


The follow-up action