Click or drag to resize
Game Class
Provides convenient access to various parts of the game that are often needed by mods.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          spaar.ModLoaderSingleInstanceGame
            spaar.ModLoaderGame

Namespace: spaar.ModLoader
Assembly: SpaarModLoader (in SpaarModLoader.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class Game : SingleInstance<Game>

The Game type exposes the following members.

Constructors
  NameDescription
Public methodGame
Initializes a new instance of the Game class
Top
Properties
  NameDescription
Public propertyStatic memberAddPiece
Reference to the AddPiece instance of the current scene. Null if there is no AddPiece in the current scene.
Public propertyStatic memberBlockInfoController
Reference to the BlockInfoController instance of the current scene. Null if there is no BlockInfoController in the current scene.
Public propertyStatic memberCompletedLevels
Array specifying whether each level is completed or not.
Public propertyStatic memberIsSimulating
Whether the game is currently simulating.
Public propertyStatic memberMachineObjectTracker
Reference to the MachineObjectTracker instance of the current scene. Null if there is no MachineObjectTracker in the current scene.
Public propertyName (Overrides SingleInstanceTName.)
Top
Methods
  NameDescription
Public methodStatic memberGetCurrentZone
Gets a Zone object representing the current zone. Returns null if the current level is not a zone.
Public methodStatic memberGetZone
Gets a Zone object representing the specified zone. The Sandbox is Zone 0, all other zones are numbered as shown in the level select screens.
Top
Events
  NameDescription
Public eventStatic memberOnKeymapperOpen
This event is fired whenever the keymapper is opened.
Public eventStatic memberOnLevelWon
This event is fired whenever the user completes a level.
Public eventStatic memberOnSimulationToggle
This event is fired whenever the simulation started or stopped.
Top
See Also