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
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
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.
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
networkInfo
RagdollDataThe 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
roleType
RoleTypeIdThe PlayerRoles.RoleTypeId of the ragdoll.
name
stringThe name of the ragdoll.
damageHandler
DamageHandlerBaseThe damage handler responsible for the ragdoll's death.
position
Vector3The position of the ragdoll.
rotation
Quaternion?The rotation of the ragdoll.
owner
PlayerThe 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
roleType
RoleTypeIdThe PlayerRoles.RoleTypeId of the ragdoll.
name
stringThe name of the ragdoll.
deathReason
stringThe reason the ragdoll died.
position
Vector3The position of the ragdoll.
rotation
Quaternion?The rotation of the ragdoll.
owner
PlayerThe optional owner of the ragdoll.
Returns
- Ragdoll
The ragdoll.
Destroy()
Destroys the ragdoll.
public void Destroy()
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
ragdoll
BasicRagdollThe 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
players
IEnumerable<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
player
PlayerThe player to get the last ragdoll.
Returns
- Ragdoll
The Last Ragdoll.
Spawn()
Spawns the ragdoll.
public void Spawn()
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
networkInfo
RagdollDataThe data associated with the ragdoll.
ragdoll
Ragdoll
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
roleType
RoleTypeIdThe PlayerRoles.RoleTypeId of the ragdoll.
name
stringThe name of the ragdoll.
damageHandler
DamageHandlerBaseThe damage handler responsible for the ragdoll's death.
ragdoll
Ragdollowner
PlayerThe 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
roleType
RoleTypeIdThe PlayerRoles.RoleTypeId of the ragdoll.
name
stringThe name of the ragdoll.
deathReason
stringThe reason the ragdoll died.
ragdoll
Ragdollowner
PlayerThe optional owner of the ragdoll.
Returns
- bool
The ragdoll.
UnSpawn()
Un-spawns the ragdoll.
public void UnSpawn()