| 1 | using System; | 
 
 
 
 
 | 2 | using System.Collections.Generic; | 
 
 
 
 
 | 3 |  | 
 
 
 
 
 | 4 | namespace Oni.Particles | 
 
 
 
 
 | 5 | { | 
 
 
 
 
 | 6 | internal class Event | 
 
 
 
 
 | 7 | { | 
 
 
 
 
 | 8 | private readonly EventType type; | 
 
 
 
 
 | 9 | private readonly List<EventAction> actions; | 
 
 
 
 
 | 10 |  | 
 
 
 
 
 | 11 | public Event(EventType type) | 
 
 
 
 
 | 12 | { | 
 
 
 
 
 | 13 | this.type = type; | 
 
 
 
 
 | 14 | this.actions = new List<EventAction>(); | 
 
 
 
 
 | 15 | } | 
 
 
 
 
 | 16 |  | 
 
 
 
 
 | 17 | public Event(EventType type, EventAction[] actions, int start, int length) | 
 
 
 
 
 | 18 | : this(type) | 
 
 
 
 
 | 19 | { | 
 
 
 
 
 | 20 | for (int i = start; i < start + length; i++) | 
 
 
 
 
 | 21 | this.actions.Add(actions[i]); | 
 
 
 
 
 | 22 | } | 
 
 
 
 
 | 23 |  | 
 
 
 
 
 | 24 | public EventType Type => type; | 
 
 
 
 
 | 25 |  | 
 
 
 
 
 | 26 | public List<EventAction> Actions => actions; | 
 
 
 
 
 | 27 | } | 
 
 
 
 
 | 28 | } |