Skip to main content
Version: 1.0.0

Interface IEntitiesBase

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

Creating and finding entities, the same on the client and the server.

public interface IEntitiesBase

Properties​

World​

The entity that stands for the whole session; throws until it exists.

World World { get; }

Property Value​

World

Methods​

Create<T>()​

Create a new entity of a given Archetype.

T Create<T>() where T : struct, IArchetype

Returns​

T

Type Parameters​

T

Create<T>(Scope)​

Creates an entity held by a scope, which removes it when the scope goes.

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

Parameters​

scope Scope

Returns​

T

Type Parameters​

T

TryGetScope<TShape, TScope>(in TShape, out TScope)​

The scope of a given shape holding this entity, if one does.

bool TryGetScope<TShape, TScope>(in TShape shape, out TScope scope) where TShape : struct, IEntityShape, allows ref struct where TScope : struct, IArchetypeQueryable, IScope

Parameters​

shape TShape

scope TScope

Returns​

bool

false when the entity is not in a scope of this type, or at all.

Type Parameters​

TShape

TScope

TryGetScope<TScope>(in EntityHandle, out TScope)​

The scope of a given shape holding this entity, if one does.

bool TryGetScope<TScope>(in EntityHandle handle, out TScope scope) where TScope : struct, IArchetypeQueryable, IScope

Parameters​

handle EntityHandle

scope TScope

Returns​

bool

false when the entity is not in a scope of this type, or at all.

Type Parameters​

TScope

TryLookup<T, TKey>(TKey, out T)​

The entity whose indexed value is the key, as the shape carrying the index.

bool TryLookup<T, TKey>(TKey key, out T shape) where T : struct, IArchetypeQueryable, IIndexed<TKey>

Parameters​

key TKey

shape T

Returns​

bool

false when nothing holds that value.

Type Parameters​

T

TKey

  • Properties
    • World
  • Methods
    • Create<T>()
    • Create<T>(Scope)
    • TryGetScope<TShape, TScope>(in TShape, out TScope)
    • TryGetScope<TScope>(in EntityHandle, out TScope)
    • TryLookup<T, TKey>(TKey, out T)