Skip to main content

Auki::ConjureKit::Session

Abstracts the shared state of a ConjureKit multiplayer session.

Public Functions

Name
boolAddComponent(EntityComponent component)
Adds an EntityComponent to the session.
boolDeleteComponent(EntityComponent component)
Deletes an EntityComponent from the session.
IDictionary< uint, EntityComponent >GetComponents(uint componentTypeId)
Gets all EntityComponents of a component type identifier.
ICollection< EntityComponent >GetComponentsByEntityId(uint entityId)
Gets all EntityComponents for an entity identifier.
boolUpdateComponent(EntityComponent component)
Tries to update an EntityComponent
Session(string id, uint participantId, IDictionary< uint, Participant > participants, IDictionary< uint, Entity > entities, IDictionary< uint, Dictionary< uint, EntityComponent >> componentTypeToEntityComponents)
List< Entity >GetParticipantEntities(uint participantId)
Gets a list of all Entities that are owned by a specific Participant.
ParticipantGetParticipant(uint participantId)
Gets Participant object from a provided Participant identifier.
EntityGetEntity(uint entityId)
Gets Entity object in the Session for a given Entity identifier.
override stringToString()

Public Properties

Name
IDictionary< uint, Participant >Participants
Dictionary mapping all SessionParticipant identifiers to their Participant objects.
IDictionary< uint, Entity >Entities
Dictionary mapping all SessionEntity identifiers to their Entity objects.

Public Attributes

Name
stringId
Session identifier.
uintParticipantId
Participant identifier for the currently connected user.

Public Functions Documentation

function AddComponent

bool AddComponent(
EntityComponent component
)

Adds an EntityComponent to the session.

Parameters:

Return: Boolean success

function DeleteComponent

bool DeleteComponent(
EntityComponent component
)

Deletes an EntityComponent from the session.

Parameters:

Return: Boolean success

function GetComponents

IDictionary< uint, EntityComponent > GetComponents(
uint componentTypeId
)

Gets all EntityComponents of a component type identifier.

Parameters:

  • componentTypeId Component type identifier

Return: Dictionary of entity identifiers mapped to EntityComponents

function GetComponentsByEntityId

ICollection< EntityComponent > GetComponentsByEntityId(
uint entityId
)

Gets all EntityComponents for an entity identifier.

Parameters:

Return: Boolean success

function UpdateComponent

bool UpdateComponent(
EntityComponent component
)

Tries to update an EntityComponent

Parameters:

Return: Boolean success

function Session

Session(
string id,
uint participantId,
IDictionary< uint, Participant > participants,
IDictionary< uint, Entity > entities,
IDictionary< uint, Dictionary< uint, EntityComponent >> componentTypeToEntityComponents
)

function GetParticipantEntities

List< Entity > GetParticipantEntities(
uint participantId
)

Gets a list of all Entities that are owned by a specific Participant.

Parameters:

Return: List of Entity objects

function GetParticipant

Participant GetParticipant(
uint participantId
)

Gets Participant object from a provided Participant identifier.

Parameters:

Return: Participant object if such Participant exists in the Session or null if it doesn't

function GetEntity

Entity GetEntity(
uint entityId
)

Gets Entity object in the Session for a given Entity identifier.

Parameters:

Return: Entity object if such Entity exists or null if it doesn't

function ToString

override string ToString()

Public Property Documentation

property Participants

IDictionary< uint, Participant > Participants;

Dictionary mapping all SessionParticipant identifiers to their Participant objects.

property Entities

IDictionary< uint, Entity > Entities;

Dictionary mapping all SessionEntity identifiers to their Entity objects.

Public Attributes Documentation

variable Id

string Id;

Session identifier.

variable ParticipantId

uint ParticipantId;

Participant identifier for the currently connected user.