Skip to content

Lifetime

namespace Griff.Scenes;
public sealed class Lifetime : Component

Destroys its entity after Seconds of game time, optionally fading it out first: bullets, effects, popups.

This is a component: its saved properties are on its component page.

public float Age { get; set; }

Seconds it has been alive: kept with the scene, so a rewind goes on from where it was.

public float FadeOut { get; set; }

Seconds at the end of its life spent fading out (see FadeTo). 0 just disappears.

public float Seconds { get; set; }

Seconds until the entity is removed.