2022-06-24 17:44:30 +10:00
|
|
|
namespace Content.Shared.Spawners.Components;
|
2022-05-29 02:29:10 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Put this component on something you would like to despawn after a certain amount of time
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
|
|
|
|
public sealed class TimedDespawnComponent : Component
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How long the entity will exist before despawning
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
[DataField("lifetime")]
|
|
|
|
|
public float Lifetime = 5f;
|
|
|
|
|
}
|