跳到主要内容
版本:Next

Class SyncExtensions

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

Extensions for moving one value between the ECS and the game at a sync point, usually a patch or system.

public static class SyncExtensions

Inheritance​

object ← SyncExtensions

Inherited Members​

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Methods​

CanPull<TShape, TAccess>(TShape, Collection<TShape, TAccess>)​

Whether this collection should be loaded from the game into the ECS.

public static bool CanPull<TShape, TAccess>(this TShape shape, Collection<TShape, TAccess> collection) where TShape : struct, IArchetypeQueryable where TAccess : allows ref struct

Parameters​

shape TShape

collection Collection<TShape, TAccess>

Returns​

bool

Type Parameters​

TShape

TAccess

CanPull<TShape, TOwner, TValue>(TShape, Value<TOwner, TValue>)​

Whether this value should be loaded from the game into the ECS.

public static bool CanPull<TShape, TOwner, TValue>(this TShape shape, Value<TOwner, TValue> value) where TShape : struct, IArchetypeQueryable where TOwner : struct, IArchetypeQueryable

Parameters​

shape TShape

value Value<TOwner, TValue>

Returns​

bool

Type Parameters​

TShape

TOwner

TValue

CanPull<TShape>(TShape, Shape<TShape>)​

Whether this shape should be loaded from the game into the ECS.

public static bool CanPull<TShape>(this TShape shape, Shape<TShape> whole) where TShape : struct, IArchetypeQueryable

Parameters​

shape TShape

whole Shape<TShape>

Returns​

bool

Type Parameters​

TShape

CanPush<TShape, TOwner, TValue>(TShape, Value<TOwner, TValue>)​

Whether this value should be applied from the ECS to the game.

public static bool CanPush<TShape, TOwner, TValue>(this TShape shape, Value<TOwner, TValue> value) where TShape : struct, IArchetypeQueryable where TOwner : struct, IArchetypeQueryable

Parameters​

shape TShape

value Value<TOwner, TValue>

Returns​

bool

Type Parameters​

TShape

TOwner

TValue

CanPush<TShape, TAccess>(TShape, Collection<TShape, TAccess>)​

Whether this collection should be applied from the ECS to the game.

public static bool CanPush<TShape, TAccess>(this TShape shape, Collection<TShape, TAccess> collection) where TShape : struct, IArchetypeQueryable where TAccess : allows ref struct

Parameters​

shape TShape

collection Collection<TShape, TAccess>

Returns​

bool

Type Parameters​

TShape

TAccess

CanPush<TShape>(TShape, Shape<TShape>)​

Whether this shape should be applied from the ECS to the game.

public static bool CanPush<TShape>(this TShape shape, Shape<TShape> whole) where TShape : struct, IArchetypeQueryable

Parameters​

shape TShape

whole Shape<TShape>

Returns​

bool

Type Parameters​

TShape

Pull<TShape, TAccess, TContext>(TShape, Collection<TShape, TAccess>, TContext)​

Reads the collection back out of the game, through the members the component exposes.

public static bool Pull<TShape, TAccess, TContext>(this TShape shape, Collection<TShape, TAccess> collection, TContext context) where TShape : struct, IArchetypeQueryable where TAccess : allows ref struct

Parameters​

shape TShape

collection Collection<TShape, TAccess>

context TContext

Returns​

bool

Type Parameters​

TShape

TAccess

TContext

Pull<TShape, TOwner, TValue, TContext>(TShape, Value<TOwner, TValue>, TContext)​

Reads the value back out of the game into the ECS.

public static bool Pull<TShape, TOwner, TValue, TContext>(this TShape shape, Value<TOwner, TValue> value, TContext context) where TShape : struct, IArchetypeQueryable where TOwner : struct, IArchetypeQueryable

Parameters​

shape TShape

value Value<TOwner, TValue>

context TContext

Returns​

bool

Type Parameters​

TShape

TOwner

TValue

TContext

Pull<TShape, TContext>(TShape, Shape<TShape>, TContext)​

Reads the entire shape back out of the game, into the ECS.

public static bool Pull<TShape, TContext>(this TShape shape, Shape<TShape> whole, TContext context) where TShape : struct, IArchetypeQueryable

Parameters​

shape TShape

whole Shape<TShape>

context TContext

Returns​

bool

Type Parameters​

TShape

TContext

Push<TShape, TAccess, TContext>(TShape, Collection<TShape, TAccess>, TContext)​

Shows the game what the collection holds. The handler is handed it to read, and the members that would change it answer no while it is being shown.

public static bool Push<TShape, TAccess, TContext>(this TShape shape, Collection<TShape, TAccess> collection, TContext context) where TShape : struct, IArchetypeQueryable where TAccess : allows ref struct

Parameters​

shape TShape

collection Collection<TShape, TAccess>

context TContext

Returns​

bool

Type Parameters​

TShape

TAccess

TContext

Push<TShape, TOwner, TValue, TContext>(TShape, Value<TOwner, TValue>, TContext)​

Applies value the ECS holds to the game.

public static bool Push<TShape, TOwner, TValue, TContext>(this TShape shape, Value<TOwner, TValue> value, TContext context) where TShape : struct, IArchetypeQueryable where TOwner : struct, IArchetypeQueryable

Parameters​

shape TShape

value Value<TOwner, TValue>

context TContext

Returns​

bool

false when the application is not allowed, or nothing maps the field in this context.

Type Parameters​

TShape

TOwner

TValue

TContext

Push<TShape, TContext>(TShape, Shape<TShape>, TContext)​

Applies the entire shape the ECS holds to the game.

public static bool Push<TShape, TContext>(this TShape shape, Shape<TShape> whole, TContext context) where TShape : struct, IArchetypeQueryable

Parameters​

shape TShape

whole Shape<TShape>

context TContext

Returns​

bool

Type Parameters​

TShape

TContext

  • Methods
    • CanPull<TShape, TAccess>(TShape, Collection<TShape, TAccess>)
    • CanPull<TShape, TOwner, TValue>(TShape, Value<TOwner, TValue>)
    • CanPull<TShape>(TShape, Shape<TShape>)
    • CanPush<TShape, TOwner, TValue>(TShape, Value<TOwner, TValue>)
    • CanPush<TShape, TAccess>(TShape, Collection<TShape, TAccess>)
    • CanPush<TShape>(TShape, Shape<TShape>)
    • Pull<TShape, TAccess, TContext>(TShape, Collection<TShape, TAccess>, TContext)
    • Pull<TShape, TOwner, TValue, TContext>(TShape, Value<TOwner, TValue>, TContext)
    • Pull<TShape, TContext>(TShape, Shape<TShape>, TContext)
    • Push<TShape, TAccess, TContext>(TShape, Collection<TShape, TAccess>, TContext)
    • Push<TShape, TOwner, TValue, TContext>(TShape, Value<TOwner, TValue>, TContext)
    • Push<TShape, TContext>(TShape, Shape<TShape>, TContext)