Class Map
A set of tools to easily handle the in-game map.
public static class Map
- Inheritance
-
Map
- Inherited Members
Properties
AmbientSoundPlayer
Gets the AmbientSoundPlayer.
public static AmbientSoundPlayer AmbientSoundPlayer { get; }
Property Value
- AmbientSoundPlayer
DecontaminationState
Gets a value indicating whether decontamination phase is in the light containment zone.
public static DecontaminationState DecontaminationState { get; }
Property Value
IsDecontaminationEnabled
Gets or sets a value indicating whether decontamination is enabled.
public static bool IsDecontaminationEnabled { get; set; }
Property Value
IsLczDecontaminated
Gets a value indicating whether decontamination has begun in the light containment zone.
public static bool IsLczDecontaminated { get; }
Property Value
PocketDimensionTeleports
Gets all PocketDimensionTeleport objects.
public static ReadOnlyCollection<PocketDimensionTeleport> PocketDimensionTeleports { get; }
Property Value
- ReadOnlyCollection<PocketDimensionTeleport>
RemainingDecontaminationTime
Gets the remaining time for the decontamination process.
public static float RemainingDecontaminationTime { get; }
Property Value
- float
The remaining time in seconds for the decontamination process.
Seed
Gets or sets the current seed of the map.
public static int Seed { get; set; }
Property Value
SqueakSpawner
Gets the SqueakSpawner.
public static SqueakSpawner SqueakSpawner { get; }
Property Value
- SqueakSpawner
Methods
Broadcast(Broadcast, bool)
Broadcasts a message to all players.
public static void Broadcast(Broadcast broadcast, bool shouldClearPrevious = false)
Parameters
broadcast
BroadcastThe Broadcast to be broadcasted.
shouldClearPrevious
boolClears all players' broadcasts before sending the new one.
Broadcast(ushort, string, BroadcastFlags, bool)
Broadcasts a message to all players.
public static void Broadcast(ushort duration, string message, Broadcast.BroadcastFlags type = BroadcastFlags.Normal, bool shouldClearPrevious = false)
Parameters
duration
ushortThe duration in seconds.
message
stringThe message that will be broadcast (supports Unity Rich Text formatting).
type
Broadcast.BroadcastFlagsThe broadcast type.
shouldClearPrevious
boolClears all players' broadcasts before sending the new one.
ChangeLightsColor(Color)
Changes the UnityEngine.Color of all lights in the facility.
public static void ChangeLightsColor(Color color)
Parameters
color
ColorThe new UnityEngine.Color of the lights.
Clean(DecalPoolType)
Destroy all specified Decals.DecalPoolType objects.
public static void Clean(DecalPoolType decalType)
Parameters
decalType
DecalPoolTypeDecal type to destroy.
Clean(DecalPoolType, int)
Destroy specified amount of specified Decals.DecalPoolType object.
public static void Clean(DecalPoolType decalType, int amount)
Parameters
decalType
DecalPoolTypeDecal type to destroy.
amount
intAmount of decals to destroy.
CleanAllItems()
Destroy all InventorySystem.Items.Pickups.ItemPickupBase objects.
public static void CleanAllItems()
CleanAllItems(IEnumerable<Pickup>)
Destroy all the Pickup objects from the specified list.
public static void CleanAllItems(IEnumerable<Pickup> pickups)
Parameters
pickups
IEnumerable<Pickup>The List of pickups to destroy.
CleanAllRagdolls()
Destroy all PlayerRoles.Ragdolls.BasicRagdoll objects.
public static void CleanAllRagdolls()
CleanAllRagdolls(IEnumerable<Ragdoll>)
Destroy all Ragdoll objects from the specified list.
public static void CleanAllRagdolls(IEnumerable<Ragdoll> ragDolls)
Parameters
ragDolls
IEnumerable<Ragdoll>The List of RagDolls to destroy.
ClearBroadcasts()
Clears all players' broadcasts.
public static void ClearBroadcasts()
Explode(Vector3, ProjectileType, Player)
Explode.
public static void Explode(Vector3 position, ProjectileType projectileType, Player attacker = null)
Parameters
position
Vector3The position where explosion will be created.
projectileType
ProjectileTypeThe projectile that will create the explosion.
attacker
PlayerThe player who create the explosion.
ExplodeEffect(Vector3, ProjectileType)
Spawn projectile effect.
public static void ExplodeEffect(Vector3 position, ProjectileType projectileType)
Parameters
position
Vector3The position where effect will be created.
projectileType
ProjectileTypeThe projectile that will create the effect.
GetNearCameras(Vector3, float)
Gets all the near cameras.
public static IEnumerable<Camera> GetNearCameras(Vector3 position, float toleration = 15)
Parameters
position
Vector3The position from which starting to search cameras.
toleration
floatThe maximum toleration to define the radius from which get the cameras.
Returns
- IEnumerable<Camera>
A IEnumerable<T> of Camera which contains all the found cameras.
GetRandomPickup(ItemType)
Gets a random Pickup.
public static Pickup GetRandomPickup(ItemType type = ItemType.None)
Parameters
type
ItemTypeFilters by ItemType.
Returns
PlaceBlood(Vector3, Vector3)
Places a blood decal.
public static void PlaceBlood(Vector3 position, Vector3 direction)
Parameters
position
Vector3The position of the blood decal.
direction
Vector3The direction of the blood decal.
PlayAmbientSound()
Plays a random ambient sound.
public static void PlayAmbientSound()
PlayAmbientSound(int)
Plays an ambient sound.
public static void PlayAmbientSound(int id)
Parameters
id
intThe id of the sound to play.
PlayGunSound(Vector3, ItemType, byte, byte)
Plays a gun sound at the specified position.
public static void PlayGunSound(Vector3 position, ItemType firearmType, byte maxDistance = 45, byte audioClipId = 0)
Parameters
position
Vector3Position to play the sound at.
firearmType
ItemTypeThe type of firearm to play the sound of.
maxDistance
byteThe maximum distance the sound can be heard from.
audioClipId
byteThe audio clip ID to play.
ResetLightsColor()
Resets the color of all lights in the facility.
public static void ResetLightsColor()
ShowHint(string, float)
Shows a hint to all players.
public static void ShowHint(string message, float duration = 3)
Parameters
message
stringThe message that will be broadcasted (supports Unity Rich Text formatting).
duration
floatThe duration in seconds.
SpawnMice(byte)
Spawns mice inside the EzShelter.
public static void SpawnMice(byte mice = 1)
Parameters
mice
byteThe type of mice you want to spawn..
StartDecontamination()
Forces the light containment zone decontamination process.
public static void StartDecontamination()
TurnOffAllLights(float, ZoneType)
Turns off all lights in the facility.
public static void TurnOffAllLights(float duration, ZoneType zoneTypes = ZoneType.Unspecified)
Parameters
TurnOffAllLights(float, IEnumerable<ZoneType>)
Turns off all lights in the facility.
public static void TurnOffAllLights(float duration, IEnumerable<ZoneType> zoneTypes)
Parameters
duration
floatThe duration of the blackout.
zoneTypes
IEnumerable<ZoneType>The ZoneTypes to affect.
TurnOnAllLights(IEnumerable<ZoneType>)
Turns on all lights in the facility.
public static void TurnOnAllLights(IEnumerable<ZoneType> zoneTypes)
Parameters
zoneTypes
IEnumerable<ZoneType>The ZoneTypes to affect.