Skip to main content
Version: 1.0.0

Interface IShapeMappingScope<TShape, TContext>

Namespace: ReadyM.SDK.Client.Mapping
Assembly: ReadyM.SDK.Client.dll

The mappings between one shape and one kind of game object.

public interface IShapeMappingScope<TShape, out TContext> where TShape : struct, IArchetypeQueryable

Type Parameters​

TShape

TContext

Methods​

Map<TValue>(Value<TShape, TValue>, Pull<TValue, TContext>, Action<TValue, TContext>?)​

Declare a mapping between a single shape field and a single context object. Leaving out the push says the game owns the value and will not be told: a shape declaring Propagation.ToEcsOnly has nothing to push.

IShapeMappingScope<TShape, out TContext> Map<TValue>(Value<TShape, TValue> value, Pull<TValue, out TContext> pull, Action<TValue, out TContext>? push = null)

Parameters​

value Value<TShape, TValue>

pull Pull<TValue, TContext>

push Action<TValue, TContext>?

Returns​

IShapeMappingScope<TShape, TContext>

Type Parameters​

TValue

Map<TAccess>(Collection<TShape, TAccess>, Collected<TAccess, TContext>, Collected<TAccess, TContext>?)​

Declare a mapping for one collection. The handler is handed the collection as its component exposes it rather than the collection itself, so what it changes is what the entity holds.

IShapeMappingScope<TShape, out TContext> Map<TAccess>(Collection<TShape, TAccess> collection, Collected<TAccess, out TContext> pull, Collected<TAccess, out TContext>? push = null) where TAccess : allows ref struct

Parameters​

collection Collection<TShape, TAccess>

pull Collected<TAccess, TContext>

push Collected<TAccess, TContext>?

Returns​

IShapeMappingScope<TShape, TContext>

Type Parameters​

TAccess

Map(Shape<TShape>, Action<TShape, TContext>, Action<TShape, TContext>?)​

Declare a mapping between the entire shape and a single context object. Used for mappings that set multiple fields at once.

IShapeMappingScope<TShape, out TContext> Map(Shape<TShape> shape, Action<TShape, out TContext> pull, Action<TShape, out TContext>? push = null)

Parameters​

shape Shape<TShape>

pull Action<TShape, TContext>

push Action<TShape, TContext>?

Returns​

IShapeMappingScope<TShape, TContext>

  • Methods
    • Map<TValue>(Value<TShape, TValue>, Pull<TValue, TContext>, Action<TValue, TContext>?)
    • Map<TAccess>(Collection<TShape, TAccess>, Collected<TAccess, TContext>, Collected<TAccess, TContext>?)
    • Map(Shape<TShape>, Action<TShape, TContext>, Action<TShape, TContext>?)