class Game

Summary

A class that represents the entire game.

syntax:
public abstract class Game
namespace: max.game

Properties

CurrentState

Current gamestate.

syntax:
protected GameState CurrentState { get; set; }

CurrentGame

The current running game.

syntax:
public static Game CurrentGame { get; private set; }

Environment

The Max environment.

syntax:
public MaxEnvironment Environment { get; private set; }

Methods

OnExit()

The exit routine of your game.

syntax:
protected abstract void OnExit();

Exit()

Exits the game.

syntax:
public static void Exit()

OnInitialize()

The initialization of your game.

syntax:
protected abstract void OnInitialize();

Run()

Runs the game.

syntax:
public void Run()

OnUpdate()

Update the game’s state here.

syntax:
protected abstract void OnUpdate();

DatatypeCreate()

Creates an instance of a specified data type.

syntax:
public static IDataType DatatypeCreate<T>()

Returns: New instance ( IDataType )

DatatypeCreate(ulong Length)

Creates an instance of a specified data type.

syntax:
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.

syntax:
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.

syntax:
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.

syntax:
public static T InstanceCreate<T>() where T : MaxObject

Returns: New instance ( T )

InstanceCreate(Type Type)

Creates an instance of the specified type.

syntax:
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.

syntax:
public void InstanceDispose(ulong UID)

Parameters

Type Name Description
ulong UID UID

InstanceDispose(MaxObject Instance)

Disposes and destroys the instance.

syntax:
public void InstanceDispose(MaxObject Instance)

Parameters

Type Name Description
MaxObject Instance Instance