class Game
Summary
A class that represents the entire game.
public abstract class Game
Properties
CurrentState
Current gamestate.
protected GameState CurrentState { get; set; }
CurrentGame
The current running game.
public static Game CurrentGame { get; private set; }
Environment
The Max environment.
public MaxEnvironment Environment { get; private set; }
Methods
OnExit()
The exit routine of your game.
protected abstract void OnExit();
Exit()
Exits the game.
public static void Exit()
OnInitialize()
The initialization of your game.
protected abstract void OnInitialize();
Run()
Runs the game.
public void Run()
OnUpdate()
Update the game’s state here.
protected abstract void OnUpdate();
DatatypeCreate()
Creates an instance of a specified data type.
public static IDataType DatatypeCreate<T>()
Returns: New instance ( IDataType )
DatatypeCreate(ulong Length)
Creates an instance of a specified data type.
public static IDataType DatatypeCreate<T>(ulong Length)
Parameters
Type | Name | Description |
---|---|---|
ulong | Length | Number of elements |
Returns: New instance ( IDataType )
DatatypeCreate(Type Type)
Creates an instance of a specified data type.
public static IDataType DatatypeCreate(Type Type)
Parameters
Type | Name | Description |
---|---|---|
Type | Type | Datatype |
Returns: New instance ( IDataType )
DatatypeCreate(Type Type, ulong Length)
Creates an instance of a specified data type.
public static IDataType DatatypeCreate(Type Type, ulong Length)
Parameters
Type | Name | Description |
---|---|---|
Type | Type | Datatype |
ulong | Length | Number of elements |
Returns: New instance ( IDataType )
InstanceCreate()
Creates an instance of the specified type.
public static T InstanceCreate<T>() where T : MaxObject
Returns: New instance ( T )
InstanceCreate(Type Type)
Creates an instance of the specified type.
public static MaxObject InstanceCreate(Type Type)
Parameters
Type | Name | Description |
---|---|---|
Type | Type | Type |
Returns: New instance ( MaxObject )
InstanceDispose(ulong UID)
Disposes and destroys the instance with the given UID.
public void InstanceDispose(ulong UID)
Parameters
Type | Name | Description |
---|---|---|
ulong | UID | UID |
InstanceDispose(MaxObject Instance)
Disposes and destroys the instance.
public void InstanceDispose(MaxObject Instance)
Parameters
Type | Name | Description |
---|---|---|
MaxObject | Instance | Instance |