C# Класс ACR_CreatureBehavior.GameObjectManager

This class maintains state that links C# object state to undelrying engine game object representations.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddGameObject ( ACR_CreatureBehavior.GameObject Obj ) : void

Insert an object into the game object table.

GameObjectManager ( ) : System

Construct a new GameObjectManager, and the underlying module object and the area list.

GetAreaObject ( uint ObjectId ) : ACR_CreatureBehavior.AreaObject

Get the C# area object for the given object id.

GetAreas ( ) : List

Get the list of all known areas.

GetCreatureObject ( uint ObjectId, bool CreateIfNeeded = false ) : CreatureObject

Get the C# creature object for the given object id.

GetGameObject ( uint ObjectId ) : ACR_CreatureBehavior.GameObject

Look up the internal GameObject for an object by object id and return the C# object state for it. The routine does not create the object state for an object id that is valid but unrecognized to us (i.e. that we have not yet seen even though it exists engine-side).

GetGameObject ( uint ObjectId, GameObjectType ObjectType ) : ACR_CreatureBehavior.GameObject

Look up the internal GameObject for an object by object id and return the C# object state for it, if the object type matched the expected type. The routine does not create the object state for an object id that is valid but unrecognized to us (i.e. that we have not yet seen even though it exists engine-side).

ProcessPendingDeletions ( ) : void

Called before we return to the engine, after all work has been finished. This function runs down objects marked for pending deletion (ensuring timely handling in cases where the deleted half of the object was explicitly detected).

RemoveGameObject ( ACR_CreatureBehavior.GameObject Obj ) : void

Remove an object from the game object table.

Приватные методы

Метод Описание
GarbageCollectObjects ( ) : void

Periodically run as a DelayCommand continuation in order to scan the object table for objects whose engine parts have been deleted. Any such objects found are removed. It is necessary to periodically poll for deleted objects because not all object types provide script events that signify deletion.

GetGameObjectUnsafe ( uint ObjectId ) : ACR_CreatureBehavior.GameObject

Resolve an object ID to a GameObject without checking for deleted objects that need garbage collection. This function should only be used by the PowerShell diagnostics infrastructure.

GetGameObjectsUnsafe ( ) : ICollection

Return an enumerator over all of the GameObject instances in the system. Note that this enumerator does NOT check for deleted objects that need garbage collection! It is intended only for use by the PowerShell diagnostics interop infrastructure. Use the standard Get*Object interfaces instead otherwise.

Initialize ( ) : void

Called during initial script object initialization to set up the periodic garbage collection of objects to delete from the object dictionary.

Описание методов

AddGameObject() публичный Метод

Insert an object into the game object table.
public AddGameObject ( ACR_CreatureBehavior.GameObject Obj ) : void
Obj ACR_CreatureBehavior.GameObject Supplies the object to insert.
Результат void

GameObjectManager() публичный Метод

Construct a new GameObjectManager, and the underlying module object and the area list.
public GameObjectManager ( ) : System
Результат System

GetAreaObject() публичный Метод

Get the C# area object for the given object id.
public GetAreaObject ( uint ObjectId ) : ACR_CreatureBehavior.AreaObject
ObjectId uint Supplies the object id to look up.
Результат ACR_CreatureBehavior.AreaObject

GetAreas() публичный Метод

Get the list of all known areas.
public GetAreas ( ) : List
Результат List

GetCreatureObject() публичный Метод

Get the C# creature object for the given object id.
public GetCreatureObject ( uint ObjectId, bool CreateIfNeeded = false ) : CreatureObject
ObjectId uint Supplies the object id to look up.
CreateIfNeeded bool If true, the C# Creature object for /// the creature is created if the object didn't already exist.
Результат CreatureObject

GetGameObject() публичный Метод

Look up the internal GameObject for an object by object id and return the C# object state for it. The routine does not create the object state for an object id that is valid but unrecognized to us (i.e. that we have not yet seen even though it exists engine-side).
public GetGameObject ( uint ObjectId ) : ACR_CreatureBehavior.GameObject
ObjectId uint Supplies the object id to look up.
Результат ACR_CreatureBehavior.GameObject

GetGameObject() публичный Метод

Look up the internal GameObject for an object by object id and return the C# object state for it, if the object type matched the expected type. The routine does not create the object state for an object id that is valid but unrecognized to us (i.e. that we have not yet seen even though it exists engine-side).
public GetGameObject ( uint ObjectId, GameObjectType ObjectType ) : ACR_CreatureBehavior.GameObject
ObjectId uint Supplies the object id to look up.
ObjectType GameObjectType Supplies the required object type.
Результат ACR_CreatureBehavior.GameObject

ProcessPendingDeletions() публичный Метод

Called before we return to the engine, after all work has been finished. This function runs down objects marked for pending deletion (ensuring timely handling in cases where the deleted half of the object was explicitly detected).
public ProcessPendingDeletions ( ) : void
Результат void

RemoveGameObject() публичный Метод

Remove an object from the game object table.
public RemoveGameObject ( ACR_CreatureBehavior.GameObject Obj ) : void
Obj ACR_CreatureBehavior.GameObject Supplies the object to remove.
Результат void