Class Ragdoll
A set of tools to handle the ragdolls more easily.
public class Ragdoll : IWrapper<BasicRagdoll>, IWorldSpace, IPosition, IRotation
- Inheritance
-
Ragdoll
- Implements
-
IWrapper<BasicRagdoll>
- Derived
- Inherited Members
- Extension Methods
Properties
AllowCleanUp
Gets a value indicating whether the clean-up event can be executed.
public bool AllowCleanUp { get; }
Property Value
Base
Gets the PlayerRoles.Ragdolls.BasicRagdoll instance of the ragdoll.
public BasicRagdoll Base { get; }
Property Value
- BasicRagdoll
CanBeCleanedUp
Gets or sets a value indicating whether the ragdoll can be cleaned up.
public bool CanBeCleanedUp { get; set; }
Property Value
CreationTime
Gets or sets the time that the ragdoll was spawned.
public DateTime CreationTime { get; set; }
Property Value
DamageHandler
Gets or sets the ragdoll's PlayerStatsSystem.DamageHandlerBase.
public DamageHandlerBase DamageHandler { get; set; }
Property Value
- DamageHandlerBase
DeathAnimations
Gets all ragdoll's DeathAnimations.DeathAnimation[].
public DeathAnimation[] DeathAnimations { get; }
Property Value
- DeathAnimation[]
DeathReason
Gets the ragdoll's death reason.
public string DeathReason { get; }
Property Value
ExistenceTime
Gets the ragdoll's existence time.
public float ExistenceTime { get; }
Property Value
FreezeTime
Gets or sets the PlayerRoles.Ragdolls.BasicRagdolls clean up time.
public static int FreezeTime { get; set; }
Property Value
GameObject
Gets the UnityEngine.GameObject of the ragdoll.
public GameObject GameObject { get; }
Property Value
- GameObject
IsConsumed
Gets or sets a value indicating whether this ragdoll has been consumed by an SCP-049-2.
public bool IsConsumed { get; set; }
Property Value
IsExpired
Gets a value indicating whether the ragdoll has expired and SCP-049 is unable to revive it if was not being targets. CanResurrect(Ragdoll)
public bool IsExpired { get; }
Property Value
IsFrozen
Gets a value indicating whether the ragdoll has been already cleaned up.
public bool IsFrozen { get; }
Property Value
IsSpawned
Gets a value indicating whether this ragdoll is spawned.
public bool IsSpawned { get; }
Property Value
List
Gets a IEnumerable<T> of Ragdoll which contains all the Ragdoll instances.
public static IReadOnlyCollection<Ragdoll> List { get; }
Property Value
Name
Gets the ragdoll's name.
public string Name { get; }
Property Value
NetworkInfo
Gets or sets the ragdoll's PlayerRoles.Ragdolls.RagdollData.
public RagdollData NetworkInfo { get; set; }
Property Value
- RagdollData
Nickname
Gets or sets the ragdoll's nickname.
public string Nickname { get; set; }
Property Value
Owner
public Player Owner { get; set; }
Property Value
Position
Gets or sets the ragdoll's position.
public Vector3 Position { get; set; }
Property Value
- Vector3
RagdollScale
Gets or sets the ragdoll's as Gameobjectscale.
public Vector3 RagdollScale { get; set; }
Property Value
- Vector3
Role
Gets or sets the PlayerRoles.RoleTypeId of the ragdoll.
public RoleTypeId Role { get; set; }
Property Value
- RoleTypeId
Room
Gets the Room the ragdoll is located in.
public Room Room { get; }
Property Value
Rotation
Gets or sets the ragdoll's rotation.
public Quaternion Rotation { get; set; }
Property Value
- Quaternion
Scale
Gets or sets the ragdoll's Scale with RagdollData.
public Vector3 Scale { get; set; }
Property Value
- Vector3
SpecialRigidbodies
Gets the ragdoll's UnityEngine.Rigidbody[].
public Rigidbody[] SpecialRigidbodies { get; }
Property Value
- Rigidbody[]
Transform
Gets the UnityEngine.Transform of the ragdoll.
public Transform Transform { get; }
Property Value
- Transform
Zone
Gets the ZoneType the ragdoll is in.
public ZoneType Zone { get; }
Property Value
Methods
CreateAndSpawn(RagdollData)
Creates and spawns a new ragdoll.
public static Ragdoll CreateAndSpawn(RagdollData networkInfo)
Parameters
networkInfoRagdollDataThe data associated with the ragdoll.
Returns
- Ragdoll
The ragdoll.
CreateAndSpawn(RoleTypeId, string, DamageHandlerBase, Vector3, Quaternion?, Player)
Creates and spawns a new ragdoll.
public static Ragdoll CreateAndSpawn(RoleTypeId roleType, string name, DamageHandlerBase damageHandler, Vector3 position, Quaternion? rotation = null, Player owner = null)
Parameters
roleTypeRoleTypeIdThe PlayerRoles.RoleTypeId of the ragdoll.
namestringThe name of the ragdoll.
damageHandlerDamageHandlerBaseThe damage handler responsible for the ragdoll's death.
positionVector3The position of the ragdoll.
rotationQuaternion?The rotation of the ragdoll.
ownerPlayerThe optional owner of the ragdoll.
Returns
- Ragdoll
The ragdoll.
CreateAndSpawn(RoleTypeId, string, string, Vector3, Quaternion?, Player)
Creates and spawns a new ragdoll.
public static Ragdoll CreateAndSpawn(RoleTypeId roleType, string name, string deathReason, Vector3 position, Quaternion? rotation = null, Player owner = null)
Parameters
roleTypeRoleTypeIdThe PlayerRoles.RoleTypeId of the ragdoll.
namestringThe name of the ragdoll.
deathReasonstringThe reason the ragdoll died.
positionVector3The position of the ragdoll.
rotationQuaternion?The rotation of the ragdoll.
ownerPlayerThe optional owner of the ragdoll.
Returns
- Ragdoll
The ragdoll.
Destroy()
Destroys the ragdoll immediately.
public void Destroy()
Destroy(float)
Destroys the ragdoll after a specified delay.
public void Destroy(float delay)
Parameters
delayfloatThe delay in seconds before the ragdoll is destroyed.
Get(Player)
Gets the IEnumerable<T> of Ragdoll belonging to the Player, if any.
public static IEnumerable<Ragdoll> Get(Player player)
Parameters
Returns
- IEnumerable<Ragdoll>
A IEnumerable<T> of Ragdoll.
Get(BasicRagdoll)
Gets the Ragdoll belonging to the PlayerRoles.Ragdolls.BasicRagdoll, if any.
public static Ragdoll Get(BasicRagdoll ragdoll)
Parameters
ragdollBasicRagdollThe PlayerRoles.Ragdolls.BasicRagdoll to get.
Returns
Get(IEnumerable<Player>)
Gets the IEnumerable<T> of Ragdoll belonging to the IEnumerable<T> of Player, if any.
public static IEnumerable<Ragdoll> Get(IEnumerable<Player> players)
Parameters
playersIEnumerable<Player>The Players to get.
Returns
- IEnumerable<Ragdoll>
A IEnumerable<T> of Ragdoll.
GetLast(Player)
Gets the last ragdoll of the player.
public static Ragdoll GetLast(Player player)
Parameters
playerPlayerThe player to get the last ragdoll.
Returns
- Ragdoll
The Last Ragdoll.
Spawn()
Spawns the ragdoll on the network.
public void Spawn()
Spawn(NetworkConnection, uint?)
Spawns the ragdoll on the network with a specified network connection or asset ID.
public void Spawn(NetworkConnection ownerConnection, uint? assetId = null)
Parameters
ownerConnectionNetworkConnectionThe network connection of the owner.
assetIduint?The optional asset ID of the ragdoll.
Spawn(GameObject)
Spawns the ragdoll on the network with a specified owner.
public void Spawn(GameObject ownerPlayer)
Parameters
ownerPlayerGameObjectThe owner of the ragdoll.
ToString()
Returns the Ragdoll in a human-readable format.
public override string ToString()
Returns
- string
A string containing Ragdoll-related data.
TryCreate(RagdollData, out Ragdoll)
Creates a new ragdoll.
public static bool TryCreate(RagdollData networkInfo, out Ragdoll ragdoll)
Parameters
networkInfoRagdollDataThe data associated with the ragdoll.
ragdollRagdoll
Returns
TryCreate(RoleTypeId, string, DamageHandlerBase, out Ragdoll, Player)
Creates a new ragdoll.
public static bool TryCreate(RoleTypeId roleType, string name, DamageHandlerBase damageHandler, out Ragdoll ragdoll, Player owner = null)
Parameters
roleTypeRoleTypeIdThe PlayerRoles.RoleTypeId of the ragdoll.
namestringThe name of the ragdoll.
damageHandlerDamageHandlerBaseThe damage handler responsible for the ragdoll's death.
ragdollRagdollownerPlayerThe optional owner of the ragdoll.
Returns
- bool
The ragdoll.
TryCreate(RoleTypeId, string, string, out Ragdoll, Player)
Creates a new ragdoll.
public static bool TryCreate(RoleTypeId roleType, string name, string deathReason, out Ragdoll ragdoll, Player owner = null)
Parameters
roleTypeRoleTypeIdThe PlayerRoles.RoleTypeId of the ragdoll.
namestringThe name of the ragdoll.
deathReasonstringThe reason the ragdoll died.
ragdollRagdollownerPlayerThe optional owner of the ragdoll.
Returns
- bool
The ragdoll.
UnSpawn()
Un-spawns the ragdoll.
public void UnSpawn()