using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Otter {
public class EventProcessorEvent {
#region Public Fields
///
/// The EventProcessor that this event belongs to.
///
public EventProcessor EventProcessor;
///
/// The elapsed time for this event.
///
public float Timer = 0;
#endregion Public Fields
#region Public Properties
///
/// The Entity that has the EventProcessor that this event belongs to.
///
public Entity Entity {
get { return EventProcessor.Entity; }
}
///
/// The Scene that has the Entity that has the EventProcessor that this event belongs to.
///
public Scene Scene {
get { return Entity.Scene; }
}
///
/// Whether or not the Event has finished.
///
public bool IsFinished { get; private set; }
#endregion Public Properties
#region Public Methods
///
/// The Scene that has the Entity that has the EventProcessor that this event belongs to.
///
/// The Type the Scene should be cast to.
/// The Scene that has the Entity that has the EventProcessor that this event belongs to.
public T GetScene() where T : Scene {
return (T)Scene;
}
///
/// Called when the Event first starts.
///
public virtual void Begin() {
}
///
/// Called when the Event finishes and is cleared from the queue.
///
public virtual void End() {
}
///
/// Finishes the event.
///
public void Finish() {
IsFinished = true;
}
///
/// Starts the event.
///
public void Start() {
IsFinished = false;
Timer = 0;
}
///
/// Called every update from the EventProcessor.
///
public virtual void Update() {
}
#endregion Public Methods
}
}