Barotrauma Client Doc
|
Classes | |
interface | IEntitySpawnInfo |
class | ItemSpawnInfo |
class | RemoveEntity |
class | SpawnEntity |
class | SpawnOrRemove |
Public Member Functions | |
EntitySpawner () | |
override string | ToString () |
void | AddItemToSpawnQueue (ItemPrefab itemPrefab, Vector2 worldPosition, float? condition=null, int? quality=null, Action< Item > onSpawned=null) |
void | AddItemToSpawnQueue (ItemPrefab itemPrefab, Vector2 position, Submarine sub, float? condition=null, int? quality=null, Action< Item > onSpawned=null) |
void | AddItemToSpawnQueue (ItemPrefab itemPrefab, Inventory inventory, float? condition=null, int? quality=null, Action< Item > onSpawned=null, bool spawnIfInventoryFull=true, bool ignoreLimbSlots=false, InvSlotType slot=InvSlotType.None) |
void | AddCharacterToSpawnQueue (Identifier speciesName, Vector2 worldPosition, Action< Character > onSpawn=null) |
void | AddCharacterToSpawnQueue (Identifier speciesName, Vector2 position, Submarine sub, Action< Character > onSpawn=null) |
void | AddCharacterToSpawnQueue (Identifier speciesName, Vector2 worldPosition, CharacterInfo characterInfo, Action< Character > onSpawn=null) |
void | AddEntityToRemoveQueue (Entity entity) |
void | AddItemToRemoveQueue (Item item) |
bool | IsInSpawnQueue (Predicate< IEntitySpawnInfo > predicate) |
Are there any entities in the spawn queue that match the given predicate More... | |
int | CountSpawnQueue (Predicate< IEntitySpawnInfo > predicate) |
How many entities in the spawn queue match the given predicate More... | |
bool | IsInRemoveQueue (Entity entity) |
void | Update (bool createNetworkEvents=true) |
void | Reset () |
void | ClientEventRead (IReadMessage message, float sendingTime) |
Public Member Functions inherited from Barotrauma.Entity | |
Entity (Submarine submarine, ushort id) | |
void | FreeID () |
Removes the entity from the entity dictionary and frees up the ID it was using. More... | |
virtual void | Remove () |
Public Attributes | |
readonly List<(Entity entity, bool isRemoval)> | receivedEvents = new List<(Entity entity, bool isRemoval)>() |
Public Attributes inherited from Barotrauma.Entity | |
readonly ushort | ID |
Unique, but non-persistent identifier. Stays the same if the entities are created in the exactly same order, but doesn't persist e.g. between the rounds. More... | |
readonly string | CreationStackTrace |
readonly UInt64 | CreationIndex |
Additional Inherited Members | |
Static Public Member Functions inherited from Barotrauma.Entity | |
static IReadOnlyCollection< Entity > | GetEntities () |
static int | FindFreeIdBlock (int minBlockSize) |
Finds a contiguous block of free IDs of at least the given size More... | |
static Entity | FindEntityByID (ushort ID) |
Find an entity based on the ID More... | |
static void | RemoveAll () |
static void | DumpIds (int count, string filename) |
Static Public Attributes inherited from Barotrauma.Entity | |
const ushort | NullEntityID = 0 |
const ushort | EntitySpawnerID = ushort.MaxValue |
const ushort | RespawnManagerID = ushort.MaxValue - 1 |
const ushort | DummyID = ushort.MaxValue - 2 |
const ushort | ReservedIDStart = ushort.MaxValue - 3 |
const ushort | MaxEntityCount = ushort.MaxValue - 4 |
static EntitySpawner | Spawner |
Protected Member Functions inherited from Barotrauma.Entity | |
virtual ushort | DetermineID (ushort id, Submarine submarine) |
Protected Attributes inherited from Barotrauma.Entity | |
AITarget | aiTarget |
Properties inherited from Barotrauma.Entity | |
static int | EntityCount [get] |
bool | Removed [get] |
bool | IdFreed [get] |
virtual Vector2 | SimPosition [get] |
virtual Vector2 | Position [get] |
virtual Vector2 | WorldPosition [get] |
virtual Vector2 | DrawPosition [get] |
Submarine | Submarine [get, set] |
AITarget | AiTarget [get] |
bool | InDetectable [get, set] |
double | SpawnTime [get] |
string | ErrorLine [get] |
Properties inherited from Barotrauma.ISpatialEntity | |
Vector2 | Position [get] |
Vector2 | WorldPosition [get] |
Vector2 | SimPosition [get] |
Submarine | Submarine [get] |
Definition at line 11 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
Barotrauma.EntitySpawner.EntitySpawner | ( | ) |
Definition at line 253 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
void Barotrauma.EntitySpawner.AddCharacterToSpawnQueue | ( | Identifier | speciesName, |
Vector2 | position, | ||
Submarine | sub, | ||
Action< Character > | onSpawn = null |
||
) |
Definition at line 321 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
void Barotrauma.EntitySpawner.AddCharacterToSpawnQueue | ( | Identifier | speciesName, |
Vector2 | worldPosition, | ||
Action< Character > | onSpawn = null |
||
) |
Definition at line 308 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
void Barotrauma.EntitySpawner.AddCharacterToSpawnQueue | ( | Identifier | speciesName, |
Vector2 | worldPosition, | ||
CharacterInfo | characterInfo, | ||
Action< Character > | onSpawn = null |
||
) |
Definition at line 334 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
void Barotrauma.EntitySpawner.AddEntityToRemoveQueue | ( | Entity | entity | ) |
Definition at line 347 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
void Barotrauma.EntitySpawner.AddItemToRemoveQueue | ( | Item | item | ) |
Definition at line 367 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
void Barotrauma.EntitySpawner.AddItemToSpawnQueue | ( | ItemPrefab | itemPrefab, |
Inventory | inventory, | ||
float? | condition = null , |
||
int? | quality = null , |
||
Action< Item > | onSpawned = null , |
||
bool | spawnIfInventoryFull = true , |
||
bool | ignoreLimbSlots = false , |
||
InvSlotType | slot = InvSlotType.None |
||
) |
Definition at line 290 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
void Barotrauma.EntitySpawner.AddItemToSpawnQueue | ( | ItemPrefab | itemPrefab, |
Vector2 | position, | ||
Submarine | sub, | ||
float? | condition = null , |
||
int? | quality = null , |
||
Action< Item > | onSpawned = null |
||
) |
Definition at line 277 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
void Barotrauma.EntitySpawner.AddItemToSpawnQueue | ( | ItemPrefab | itemPrefab, |
Vector2 | worldPosition, | ||
float? | condition = null , |
||
int? | quality = null , |
||
Action< Item > | onSpawned = null |
||
) |
Definition at line 264 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
void Barotrauma.EntitySpawner.ClientEventRead | ( | IReadMessage | message, |
float | sendingTime | ||
) |
Implements Barotrauma.Networking.IServerSerializable.
Definition at line 11 of file BarotraumaClient/ClientSource/Networking/EntitySpawner.cs.
int Barotrauma.EntitySpawner.CountSpawnQueue | ( | Predicate< IEntitySpawnInfo > | predicate | ) |
How many entities in the spawn queue match the given predicate
Definition at line 399 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
bool Barotrauma.EntitySpawner.IsInRemoveQueue | ( | Entity | entity | ) |
Definition at line 409 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
bool Barotrauma.EntitySpawner.IsInSpawnQueue | ( | Predicate< IEntitySpawnInfo > | predicate | ) |
Are there any entities in the spawn queue that match the given predicate
Definition at line 387 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
void Barotrauma.EntitySpawner.Reset | ( | ) |
Definition at line 452 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
override string Barotrauma.EntitySpawner.ToString | ( | ) |
Definition at line 259 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
void Barotrauma.EntitySpawner.Update | ( | bool | createNetworkEvents = true | ) |
Definition at line 418 of file BarotraumaShared/SharedSource/Networking/EntitySpawner.cs.
readonly List<(Entity entity, bool isRemoval)> Barotrauma.EntitySpawner.receivedEvents = new List<(Entity entity, bool isRemoval)>() |
Definition at line 9 of file BarotraumaClient/ClientSource/Networking/EntitySpawner.cs.