stageEvents/StageEvent.cs

Abstract base class for stage events. It stores the event type, a lifetime, and a TimeSince timestamp, and defines lifecycle methods Start, Update, and Remove that derived events override.

using System;
using System.Reflection;
using Sandbox;

public abstract class StageEvent
{
	public EventType EventType { get; set; }
	public TimeSince TimeSinceStart { get; private set; }
	public float Lifetime { get; set;}

	public virtual void Start( int randSeed )
	{
		TimeSinceStart = 0f;
	}

	public virtual void Update()
	{

	}

	public virtual void Remove()
	{

	}
}