A Smoll game engine
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

25 wiersze
626 B

using System.Numerics;
using Raylib_cs;
namespace Smoll.Ex2 {
class TimeToLiveComponent : Smoll.Component {
float secondsToLive;
float lived = 0f;
public TimeToLiveComponent(float secondsToLive)
{
this.secondsToLive = secondsToLive;
}
public override void Update(float deltaTimeSeconds)
{
lived += deltaTimeSeconds;
if(lived > secondsToLive) owner.mustDelete = true;
}
public override void Draw(Smoll.Layer.DrawMode drawMode) {
if(drawMode == Layer.DrawMode.Debug) {
}
}
}
}