Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    System.Object
    Tool
    PlayModeTool
    Inherited Members
    Tool.RemoveTool
    Tool.MoveTool
    Tool.PlayModeTool
    Tool.BuildTools
    Tool.SelectedObject
    Tool.SelectedWall
    Tool.SelectedRoof
    Tool.IsRotateCwPressed
    Tool.IsRotateCcwPressed
    Tool.IsCopyPressed
    Tool.OnOpened
    Tool.OnClosed
    Tool.OnUpdate
    Tool.OnDraw
    Tool.OnInitBuildModeUi
    Tool.Input
    Tool.Map
    Tool.Money
    Tool.Texture
    Tool.DisplayAsTab
    Tool.MousePos
    Tool.InitBuildModeUi(Panel, Panel)
    Tool.Draw(GameTime, SpriteBatch)
    Tool.GetMouseCursor()
    Tool.ForceWallsUp()
    Tool.CanSwitchGameModes()
    Tool.ShouldHighlightSelectedObject(Object)
    Tool.OnButtonCreated(Button)
    Tool.IsOnLot(Point)
    Tool.ColorSelection(ColorScheme[], Action<Int32, Int32>, Func<Int32, Int32, Boolean>)
    Tool.ColorSelection(ColorScheme, Action<Int32>, Func<Int32, Boolean>)
    Tool.BuildModeButton(String, Element.GenericCallback, Element.DrawCallback, Single, TextureRegion, IEnumerable<String>, Nullable<Single>)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    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
    Tool.CanUndoRedo()

    Closed()

    Called when this build tool is closed. By default, this method removes its elements from the ui.

    Declaration
    public override void Closed()
    Overrides
    Tool.Closed()

    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
    Tool.Opened()

    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

    Overrides
    Tool.Update(GameTime)

    Extension Methods

    Extensions.JsonCopy<T>(T)
    ☀
    ☾
    In This Article
    Back to top
    © 2021-2023 Ellpeck Games, Top Hat Studios – Impressum – Privacy – Status
    ☀
    ☾