Table of Contents

Class GameElement

Namespace
Termule.Engine.Core
Assembly
Termule.Engine.dll

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

bool

Game

Gets the game that this element is a part of.

protected Game Game { get; }

Property Value

Game

Systems

Gets the SystemManager of this element's Game.

protected SystemManager Systems { get; }

Property Value

SystemManager

World

Gets the world GameObject of this element's Game.

protected GameObject World { get; }

Property Value

GameObject

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

TSystem

The type of system to look for.

Exceptions

MissingSystemException<TMissing>

Thrown if no matching system is found.