Class IGameBehavior
Represents the base class for game behaviors in the Genesis framework.
Inheritance
IGameBehavior
Inherited Members
Namespace: Genesis.Core
Assembly: Genesis.dll
Syntax
public abstract class IGameBehavior
Constructors
IGameBehavior()
Declaration
protected IGameBehavior()
Properties
Parent
Gets or sets the parent game element to which this behavior is attached.
Declaration
public GameElement Parent { get; set; }
Property Value
Type | Description |
---|---|
GameElement |
Methods
OnDestroy(Game, GameElement)
Called when the game behavior is being destroyed.
Declaration
public abstract void OnDestroy(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
GameElement | parent | The parent game element. |
OnInit(Game, GameElement)
Called when the game behavior is initialized.
Declaration
public abstract void OnInit(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
GameElement | parent | The parent game element. |
OnRender(Game, GameElement)
Called when the game behavior is rendered.
Declaration
public abstract void OnRender(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
GameElement | parent | The parent game element. |
OnUpdate(Game, GameElement)
Called when the game behavior is updated.
Declaration
public abstract void OnUpdate(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
GameElement | parent | The parent game element. |