|
enum | ID_OBJECT_TYPE : byte {
ID_OBJECT_TYPE.UNKNOWN = 0,
ID_OBJECT_TYPE.ENTITY = 1,
ID_OBJECT_TYPE.IDENTITY = 2,
ID_OBJECT_TYPE.FACTION = 3,
ID_OBJECT_TYPE.NPC = 4,
ID_OBJECT_TYPE.SPAWN_GROUP = 5,
ID_OBJECT_TYPE.ASTEROID = 6,
ID_OBJECT_TYPE.PLANET = 7,
ID_OBJECT_TYPE.VOXEL_PHYSICS = 8,
ID_OBJECT_TYPE.PLANET_ENVIRONMENT_SECTOR = 9,
ID_OBJECT_TYPE.PLANET_ENVIRONMENT_ITEM = 10,
ID_OBJECT_TYPE.PLANET_VOXEL_DETAIL = 11
} |
|
enum | ID_ALLOCATION_METHOD : byte { ID_ALLOCATION_METHOD.RANDOM = 0,
ID_ALLOCATION_METHOD.SERIAL_START_WITH_1 = 1
} |
|
|
static Dictionary< long, IMyEntity > | m_entityList [get] |
|
static bool | AllocationSuspended [get, set] |
| Freezes allocating entity ids. This is important, because during load, no entity cannot allocate new id, because it could allocate id which already has entity which will be loaded soon. More...
|
|
Definition at line 11 of file MyEntityIdentifier.cs.
Enumerator |
---|
UNKNOWN |
|
ENTITY |
|
IDENTITY |
|
FACTION |
|
NPC |
|
SPAWN_GROUP |
|
ASTEROID |
|
PLANET |
|
VOXEL_PHYSICS |
|
PLANET_ENVIRONMENT_SECTOR |
|
PLANET_ENVIRONMENT_ITEM |
|
PLANET_VOXEL_DETAIL |
|
Definition at line 48 of file MyEntityIdentifier.cs.
static VRage.MyEntityIdentifier.MyEntityIdentifier |
( |
| ) |
|
|
inlinestatic |
static void VRage.MyEntityIdentifier.AddEntityWithId |
( |
IMyEntity |
entity | ) |
|
|
inlinestatic |
Registers entity with given ID. Do not call this directly, it is called automatically when EntityID is first time assigned.
- Parameters
-
Definition at line 130 of file MyEntityIdentifier.cs.
static long VRage.MyEntityIdentifier.AllocateId |
( |
ID_OBJECT_TYPE |
objectType = ID_OBJECT_TYPE.ENTITY , |
|
|
ID_ALLOCATION_METHOD |
generationMethod = ID_ALLOCATION_METHOD.RANDOM |
|
) |
| |
|
inlinestatic |
Allocated new entity ID (won't add to list) Entity with this ID should be added immediatelly
Definition at line 142 of file MyEntityIdentifier.cs.
static void VRage.MyEntityIdentifier.Clear |
( |
| ) |
|
|
inlinestatic |
static void VRage.MyEntityIdentifier.ClearPerThreadEntities |
( |
| ) |
|
|
inlinestatic |
static long VRage.MyEntityIdentifier.ConstructId |
( |
ID_OBJECT_TYPE |
type, |
|
|
long |
uniqueNumber |
|
) |
| |
|
inlinestatic |
static long VRage.MyEntityIdentifier.ConstructIdFromString |
( |
ID_OBJECT_TYPE |
type, |
|
|
string |
uniqueString |
|
) |
| |
|
inlinestatic |
static void VRage.MyEntityIdentifier.DestroyPerThreadStorage |
( |
| ) |
|
|
inlinestatic |
static bool VRage.MyEntityIdentifier.ExistsById |
( |
long |
entityId | ) |
|
|
inlinestatic |
static long VRage.MyEntityIdentifier.FixObsoleteIdentityType |
( |
long |
id | ) |
|
|
inlinestatic |
static IMyEntity VRage.MyEntityIdentifier.GetEntityById |
( |
long |
entityId | ) |
|
|
inlinestatic |
static ID_OBJECT_TYPE VRage.MyEntityIdentifier.GetIdObjectType |
( |
long |
id | ) |
|
|
inlinestatic |
static long VRage.MyEntityIdentifier.GetIdUniqueNumber |
( |
long |
id | ) |
|
|
inlinestatic |
static void VRage.MyEntityIdentifier.GetPerThreadEntities |
( |
List< IMyEntity > |
result | ) |
|
|
inlinestatic |
static void VRage.MyEntityIdentifier.InitPerThreadStorage |
( |
int |
defaultCapacity | ) |
|
|
inlinestatic |
static void VRage.MyEntityIdentifier.LazyInitPerThreadStorage |
( |
int |
defaultCapacity | ) |
|
|
inlinestatic |
static void VRage.MyEntityIdentifier.MarkIdUsed |
( |
long |
id | ) |
|
|
inlinestatic |
This method is used when loading existing entity IDs to track the last generated ID
Definition at line 116 of file MyEntityIdentifier.cs.
static void VRage.MyEntityIdentifier.RemoveEntity |
( |
long |
entityId | ) |
|
|
inlinestatic |
static void VRage.MyEntityIdentifier.Reset |
( |
| ) |
|
|
inlinestatic |
static void VRage.MyEntityIdentifier.SwapRegisteredEntityId |
( |
IMyEntity |
entity, |
|
|
long |
oldId, |
|
|
long |
newId |
|
) |
| |
|
inlinestatic |
Changes ID by which an entity is registered. Do not call this directly, it is called automatically when EntityID changes.
- Parameters
-
entity | Entity whose ID has changed. |
oldId | Old ID of the entity. |
newId | New ID of the entity. |
Definition at line 245 of file MyEntityIdentifier.cs.
static bool VRage.MyEntityIdentifier.TryGetEntity |
( |
long |
entityId, |
|
|
out IMyEntity |
entity |
|
) |
| |
|
inlinestatic |
const int VRage.MyEntityIdentifier.DEFAULT_DICTIONARY_SIZE = 32768 |
long [] VRage.MyEntityIdentifier.m_lastGeneratedIds = new long[(int)MyEnum<ID_OBJECT_TYPE>.Range.Max + 1] |
|
static |
bool VRage.MyEntityIdentifier.AllocationSuspended |
|
staticgetset |
Freezes allocating entity ids. This is important, because during load, no entity cannot allocate new id, because it could allocate id which already has entity which will be loaded soon.
Definition at line 43 of file MyEntityIdentifier.cs.
Dictionary<long, IMyEntity> VRage.MyEntityIdentifier.m_entityList |
|
staticget |
The documentation for this struct was generated from the following file: