C# Class GameEngine.GameManager

GameManager is the class that handles a game, it handles all the gameobjects and runs the current turn based of the gameobjects Initative
Datei anzeigen Open project: Kursledare/Mookieraw Class Usage Examples

Public Properties

Property Type Description
ActiveGameManager GameManager
GameObjects List
UnregisterEvent Action

Public Methods

Method Description
GameManager ( ) : System
Register ( IGameObject gameObject ) : void

Add a object to the scene, gameObject is a IGameObject

RunTurn ( ) : void

When all decisions and actions are selected "RunTurn" should be called, and it will iterate through all the gameObjects and run their "Actions". Action is run on each GameObject in "GameObject" ordered by Descending Initative.

SelectNextCharacter ( ) : void

Sets CurrentCharacter To the next character in Party.

Unregister ( IGameObject gameObject ) : void

When somebody dies, or when a gameobject doesnt need to be called anyMore, Use Unregister, and it will be removes before the next "Turn"

Private Methods

Method Description
SelectedCarachterOpaciySet ( ) : void

Method Details

GameManager() public method

public GameManager ( ) : System
return System

Register() public method

Add a object to the scene, gameObject is a IGameObject
public Register ( IGameObject gameObject ) : void
gameObject IGameObject
return void

RunTurn() public method

When all decisions and actions are selected "RunTurn" should be called, and it will iterate through all the gameObjects and run their "Actions". Action is run on each GameObject in "GameObject" ordered by Descending Initative.
public RunTurn ( ) : void
return void

SelectNextCharacter() public method

Sets CurrentCharacter To the next character in Party.
public SelectNextCharacter ( ) : void
return void

Unregister() public method

When somebody dies, or when a gameobject doesnt need to be called anyMore, Use Unregister, and it will be removes before the next "Turn"
public Unregister ( IGameObject gameObject ) : void
gameObject IGameObject
return void

Property Details

ActiveGameManager public_oe static_oe property

public static GameManager,GameEngine ActiveGameManager
return GameManager

GameObjects public_oe property

This is the list of all gameobjects in the "Scene", visible or not. Use the method Register To add new objects.
public List GameObjects
return List

UnregisterEvent public_oe property

Action that is invoked in Unregister(IGameObject), before IGameObject is removed from GameManager
public Action UnregisterEvent
return Action