Table of Contents

Class CharacterLinks

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Making and reaching characters' Core entities. Feature state lives as components on the entity; the archetype (player, NPC) gives each new entity what the installed modules add to it.

public static class CharacterLinks
Inheritance
CharacterLinks
Inherited Members

Methods

character's T, by reference, given it when it has none (the module that owns T normally adds it through the archetype). Throws when the character has no entity: it is not spawned and was not loaded, or no Core world runs on its side.

public static ref T Component<T>(this ICharacter character) where T : struct

Parameters

character ICharacter

Returns

T

Type Parameters

T

character's entity, or FishMMO.Core.EntityLink.None.

public static EntityLink CoreLink(this ICharacter character)

Parameters

character ICharacter

Returns

EntityLink

Ends link's entity: at once, or at the end of the phase while its world ticks.

public static void Destroy(EntityLink link)

Parameters

link EntityLink

Whether character has an entity, so Component<T>(ICharacter) can be asked.

public static bool HasCoreEntity(this ICharacter character)

Parameters

character ICharacter

Returns

bool

A new entity of archetype in networkManager's side world, standing for character. False when that side runs no world (it is not started).

public static bool TryCreate(NetworkManager networkManager, SimulationSide side, string archetype, ICharacter character, out EntityLink link)

Parameters

networkManager NetworkManager
side SimulationSide
archetype string
character ICharacter
link EntityLink

Returns

bool