Class GameElement
Base class for elements that live within a Game.
public abstract class GameElement
- Inheritance
-
GameElement
- Derived
- Inherited Members
Properties
Activated
Gets a value indicating whether this element is part of a game.
protected bool Activated { get; }
Property Value
Game
Gets the game that this element is a part of.
protected Game Game { get; }
Property Value
Systems
Gets the SystemManager of this element's Game.
protected SystemManager Systems { get; }
Property Value
World
Gets the world GameObject of this element's Game.
protected GameObject World { get; }
Property Value
Methods
Activate()
Called when this element is added to a Game.
protected virtual void Activate()
Deactivate()
Called when this element is removed from its Game.
protected virtual void Deactivate()
GetRequiredSystem<TSystem>()
Tries to get a system of type TSystem from the containing game,
throwing if it cannot be found.
protected TSystem GetRequiredSystem<TSystem>() where TSystem : System
Returns
- TSystem
The game's instance of
TSystem.
Type Parameters
TSystemThe type of system to look for.
Exceptions
- MissingSystemException<TMissing>
Thrown if no matching system is found.