コード例 #1
0
ファイル: EventData.cs プロジェクト: SeiZon/GlobalGameJam16
        public void InterruptEvent(InterruptAction interruptActionDone)
        {

            if (eventsRunning[interruptActions[interruptActionDone]])
            {
                eventsRunning[interruptActions[interruptActionDone]] = false;
            }
            
        }
コード例 #2
0
        /// <summary>
        /// Loads the next interrupt into the games interrupt field.
        /// </summary>
        /// <returns>True if an interrupt was found.</returns>
        public bool CheckForInterrupt()
        {
            if (this.Interrupt != null)
            {
                return(true);
            }
            InterruptAction interrupt = null;

            if (!interrupts.IsEmpty)
            {
                interrupts = interrupts.Pop(out interrupt);
            }
            this.Interrupt = interrupt;
            return(this.Interrupt != null);
        }
コード例 #3
0
 /// <summary>
 /// Adds an interrupt to the interrupt queue.
 /// These will take priority over the normal game flow,
 /// and will be executed sequentially until there are no
 /// more interrupts left in queue.
 /// </summary>
 /// <param name="interrupt"></param>
 public void AddInterrupt(InterruptAction interrupt)
 {
     interrupts = interrupts.Push(interrupt);
 }