跳到主要内容
版本:Next

Interface IEntities

Namespace: ReadyM.SDK.Server.Entities
Assembly: ReadyM.SDK.Server.dll

Every entity on the server: create, query, look up and delete them.

public interface IEntities : IEntitiesBase

Implements​

IEntitiesBase

Methods​

Create<T>(Scope, PlayerId)​

Create a new entity of the given archetype, in a given scope, owned by the given player.

T Create<T>(Scope scope, PlayerId owner) where T : struct, IArchetype

Parameters​

scope Scope

owner PlayerId

Returns​

T

Type Parameters​

T

Delete<T>(in T)​

Remove an entity from the world.

bool Delete<T>(in T shape) where T : IEntityShape, allows ref struct

Parameters​

shape T

Returns​

bool

false if the entity was already deleted.

Type Parameters​

T

Query<T>()​

Iterate over every entity of a given archetype or containting a given mixin.

EntityQuery<T> Query<T>() where T : struct, IArchetypeQueryable

Returns​

EntityQuery<T>

Type Parameters​

T

Archetype or Mixin

Query<T1, T2>()​

Iterate over every entity carrying both mixins.

EntityQuery<T1, T2> Query<T1, T2>() where T1 : struct, IArchetypeQueryable where T2 : struct, IArchetypeMixin

Returns​

EntityQuery<T1, T2>

Type Parameters​

T1

T2

Query<T1, T2, T3>()​

Iterate over every entity carrying all 3 mixins.

EntityQuery<T1, T2, T3> Query<T1, T2, T3>() where T1 : struct, IArchetypeQueryable where T2 : struct, IArchetypeMixin where T3 : struct, IArchetypeMixin

Returns​

EntityQuery<T1, T2, T3>

Type Parameters​

T1

T2

T3

Query<T1, T2, T3, T4>()​

Iterate over every entity carrying all 4 mixins.

EntityQuery<T1, T2, T3, T4> Query<T1, T2, T3, T4>() where T1 : struct, IArchetypeQueryable where T2 : struct, IArchetypeMixin where T3 : struct, IArchetypeMixin where T4 : struct, IArchetypeMixin

Returns​

EntityQuery<T1, T2, T3, T4>

Type Parameters​

T1

T2

T3

T4

Query<T1, T2, T3, T4, T5>()​

Iterate over every entity carrying all 5 mixins.

EntityQuery<T1, T2, T3, T4, T5> Query<T1, T2, T3, T4, T5>() where T1 : struct, IArchetypeQueryable where T2 : struct, IArchetypeMixin where T3 : struct, IArchetypeMixin where T4 : struct, IArchetypeMixin where T5 : struct, IArchetypeMixin

Returns​

EntityQuery<T1, T2, T3, T4, T5>

Type Parameters​

T1

T2

T3

T4

T5

Query<T1, T2, T3, T4, T5, T6>()​

Iterate over every entity carrying all 6 mixins.

EntityQuery<T1, T2, T3, T4, T5, T6> Query<T1, T2, T3, T4, T5, T6>() where T1 : struct, IArchetypeQueryable where T2 : struct, IArchetypeMixin where T3 : struct, IArchetypeMixin where T4 : struct, IArchetypeMixin where T5 : struct, IArchetypeMixin where T6 : struct, IArchetypeMixin

Returns​

EntityQuery<T1, T2, T3, T4, T5, T6>

Type Parameters​

T1

T2

T3

T4

T5

T6

  • Methods
    • Create<T>(Scope, PlayerId)
    • Delete<T>(in T)
    • Query<T>()
    • Query<T1, T2>()
    • Query<T1, T2, T3>()
    • Query<T1, T2, T3, T4>()
    • Query<T1, T2, T3, T4, T5>()
    • Query<T1, T2, T3, T4, T5, T6>()