Table of Contents

Class GameObject

Namespace
Alis.Core.Ecs.Entity
Assembly
Alis.dll

The game object class

public class GameObject : IGameObject<AComponent>, IEnabled, IIdentifier, IRuntime, ICrud<AComponent>, IBuilder<GameObjectBuilder>

Inheritance

Implements

Inherited Members

Constructors

GameObject()

Initializes a new instance of the Alis.Core.Ecs.Entity.GameObject class

public GameObject()

GameObject(bool, string, string, string, Transform)

Initializes a new instance of the Alis.Core.Ecs.Entity.GameObject class

public GameObject(bool isEnable, string name, string id, string tag, Transform transform)

Parameters

isEnable bool

The is enable

name string

The name

id string

The id

tag string

The tag

transform Transform

The transform

GameObject(bool, string, string, string, Transform, List<AComponent>)

Initializes a new instance of the Alis.Core.Ecs.Entity.GameObject class

public GameObject(bool isEnable, string name, string id, string tag, Transform transform, List<AComponent> components)

Parameters

isEnable bool

The is enable

name string

The name

id string

The id

tag string

The tag

transform Transform

The transform

components List<AComponent>

The components

Properties

Components

Gets or sets the value of the components

[JsonPropertyName("_Components_")]
public List<AComponent> Components { get; set; }

Property Value

List<AComponent>

Context

Gets or sets the value of the context

public Context Context { get; }

Property Value

Context

Id

Gets or sets the value of the id

[JsonPropertyName("_Id_")]
public string Id { get; set; }

Property Value

string

IsEnable

Gets or sets the value of the is enable

[JsonPropertyName("_IsEnable_")]
public bool IsEnable { get; set; }

Property Value

bool

IsStatic

Gets or sets the value of the is static

[JsonPropertyName("_IsStatic_")]
public bool IsStatic { get; set; }

Property Value

bool

Name

Gets or sets the value of the name

[JsonPropertyName("_Name_")]
public string Name { get; set; }

Property Value

string

Tag

Gets or sets the value of the tag

[JsonPropertyName("_Tag_")]
public string Tag { get; set; }

Property Value

string

Transform

Gets or sets the value of the transform

[JsonPropertyName("_Transform_")]
public Transform Transform { get; set; }

Property Value

Transform

Methods

Add<T>(T)

Adds the component

public void Add<T>(T value) where T : AComponent

Parameters

value T

The component

Type Parameters

T

The

Builder()

Builders this instance

public GameObjectBuilder Builder()

Returns

GameObjectBuilder

The game object builder

Clear()

Clears this instance

public void Clear()

Contains<T>()

Describes whether this instance contains

public bool Contains<T>() where T : AComponent

Returns

bool

The bool

Type Parameters

T

The

Create()

Creates

public static GameObjectBuilder Create()

Returns

GameObjectBuilder

The game object builder

Get<T>()

Gets this instance

public T Get<T>() where T : AComponent

Returns

T

The

Type Parameters

T

The

OnAfterFixedUpdate()

Ons the after fixed update

public void OnAfterFixedUpdate()

OnAfterUpdate()

Ons the after update

public void OnAfterUpdate()

OnAwake()

Ons the awake

public void OnAwake()

OnBeforeFixedUpdate()

Ons the before fixed update

public void OnBeforeFixedUpdate()

OnBeforeUpdate()

Ons the before update

public void OnBeforeUpdate()

OnCalculate()

Ons the calculate

public void OnCalculate()

OnDestroy()

Ons the destroy

public void OnDestroy()

OnDisable()

Ons the disable

public void OnDisable()

OnDispatchEvents()

Ons the dispatch events

public void OnDispatchEvents()

OnDraw()

Ons the draw

public void OnDraw()

OnEnable()

Ons the enable

public void OnEnable()

OnExit()

Ons the exit

public void OnExit()

OnFixedUpdate()

Ons the fixed update

public void OnFixedUpdate()

OnGui()

Ons the gui

public void OnGui()

OnInit()

Ons the init

public void OnInit()

OnReset()

Ons the reset

public void OnReset()

OnStart()

Ons the start

public void OnStart()

OnStop()

Ons the stop

public void OnStop()

OnUpdate()

Ons the update

public void OnUpdate()

Remove<T>(T)

Removes the component

public void Remove<T>(T value) where T : AComponent

Parameters

value T

The component

Type Parameters

T

The

See Also