KMGameInfo - Qkrisi/ktanemodkit GitHub Wiki

KMGameInfo

[DisallowMultipleComponent]
public class KMGameInfo : MonoBehaviour

Used to get information about game and to get notified of game state changes.


public KMStateChangeDelegate OnStateChange;

Delegate that gets called when the game goes into a new scene.

Delegate signature: delegate void KMStateChangeDelegate(State state)


public KMAlarmClockChangeDelegate OnAlarmClockChange;

Delegate that gets called when the alarm clock turns on or off.

Delegate signature: delegate void KMAlarmClockChangeDelegate(bool on)


public KMLightsChangeDelegate OnLightsChange;

Delegate that gets called when the lights in the gameplay room turn on or off.

Delegate signature: delegate void KMLightsChangeDelegate(bool on)


public List<KMModuleInfo> GetAvailableModuleInfo()

Gets information about all available modules that could be used in a bomb.


public int GetMaximumBombModules()

Gets the maximum amount of modules that can be on a bomb according to the bomb cases available.


public int GetMaximumModulesFrontFace()

Gets the maximum amount of modules that can be on the front face of a bomb according to the bomb cases available.

Other types

public enum State

Enumeration of game states (scenes)

Values: Gameplay, Setup, PostGame, Transitioning, Unlock (tutorial), Quitting


public struct KMModuleInfo

A structure that contains informations about a module.

Fields:

public string DisplayName;

Name of the module


public string ModuleId;

ID of the module


public bool IsMod;

Indicates whether the module is a modded (true) or a vanilla (false) module.


public bool IsNeedy;

Indicates whether the module is a needy (true) or a solvable (false) module.


public KMComponentPool.ComponentTypeEnum ModuleType;

Type of the vanilla module (Empty if it's a modded one.)