Clientside component that represents a player corpse. Stores the connection and creation time and schedules the GameObject to be destroyed after 60 seconds when enabled.
// copy https://github.com/Facepunch/sbox-walker/blob/main/code/Player/PlayerCorpse.cs
namespace Sandbox.TacitPlayer;
/// <summary>
/// A corpse. Clientside only. Automatically destroyed after a period of time.
/// </summary>
public class TacitPlayerCorpse : Component
{
public Connection Connection { get; set; }
public DateTime Created { get; set; }
protected override void OnEnabled()
{
Invoke( 60.0f, GameObject.Destroy );
}
}