Class PlayModeTool
A tool is a type of game mode that is currently active. Tools are split up into the PlayModeTool and BuildTools, the latter of which holds all tools that can be found in the build menu.
Inherited Members
Namespace: TinyLife.Tools
Assembly: Tiny Life.dll
Syntax
public class PlayModeTool : Tool
Constructors
PlayModeTool()
Declaration
public PlayModeTool()
Properties
SelectedPerson
Stores the Person that is currently selected
Declaration
public Person SelectedPerson { get; }
Property Value
Type | Description |
---|---|
Person |
SelectedStat
The PlayModeTool.StatType that is currently se
Declaration
public PlayModeTool.StatType SelectedStat { get; }
Property Value
Type | Description |
---|---|
PlayModeTool.StatType |
Methods
CanUndoRedo()
Returns whether or not the UndoRedoStack can currently operate and thus, whether the Undo() or Redo() actions can be called.
Declaration
public override bool CanUndoRedo()
Returns
Type | Description |
---|---|
System.Boolean | Whether the undo or redo commands can be used right now. |
Overrides
Closed()
Called when this build tool is closed. By default, this method removes its elements from the ui.
Declaration
public override void Closed()
Overrides
Opened()
Called when this build tool is opened. By default, this method initializes several settings and calls InitBuildModeUi(Panel, Panel).
Declaration
public override void Opened()
Overrides
Reload()
Reloads the play mode tool's ui
Declaration
public static void Reload()
Update(GameTime)
This method is called every update frame for the CurrentTool. By default, this method updates the MousePos and invokes OnUpdate, and also manages the UndoRedoStack.
Declaration
public override void Update(GameTime time)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Xna.Framework.GameTime | time | The game's time |