Table of Contents

Class SceneObject

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Manages registration and tracking of scene objects with unique IDs in FishMMO.

public class SceneObject
Inheritance
SceneObject
Inherited Members

Fields

Objects

Dictionary of all registered scene objects, keyed by their unique ID.

public static readonly Dictionary<long, ISceneObject> Objects

Field Value

Dictionary<long, ISceneObject>

Methods

IsRegistered(ISceneObject)

True when this exact object is the one currently registered under its own ID.

public static bool IsRegistered(ISceneObject sceneObject)

Parameters

sceneObject ISceneObject

The object to test.

Returns

bool

True if registered.

Register(ISceneObject, bool)

Registers a scene object, assigning a unique ID if not a client object.

public static void Register(ISceneObject sceneObject, bool asClient = false)

Parameters

sceneObject ISceneObject

The scene object to register.

asClient bool

If true, do not assign an ID (server will assign).

Unregister(ISceneObject)

Unregisters a scene object, removing it from the dictionary.

public static void Unregister(ISceneObject sceneObject)

Parameters

sceneObject ISceneObject

The scene object to unregister.

Events

Registered

Raised after an object is registered, on the server and on clients. For a peer that heard of an object (by ID) before the object itself arrived: a pet's PetAddBroadcast can reach its owner before the pet's spawn does.

public static event Action<ISceneObject> Registered

Event Type

Action<ISceneObject>