Пример #1
0
    /// <summary>
    /// Returns the next event, dequeueing it and resetting the head
    /// </summary>
    /// <returns>The next event</returns>
    public BattleEventBase GetNext()
    {
        BattleEventBase eventToReturn = events[0];

        events.RemoveAt(0);
        insertionIndex = 0;
        return(eventToReturn);
    }
Пример #2
0
 /// <summary>
 /// Inserts an event at the head of the queue
 /// </summary>
 /// <param name="eventToInsert">Event to add to the queue</param>
 public void Insert(BattleEventBase eventToInsert)
 {
     events.Insert(insertionIndex, eventToInsert);
     insertionIndex++;
 }
 public void raiseEvent(BattleEventBase battleEvent)
 {
     this._nextEventList.Add(battleEvent);
 }