public PlayerController(TimedInstruction instruction)
 {
     if (instruction != null)
         {
         this._nextInstruction = instruction;
         }
 }
 public PlayerController(IEnumerable<TimedInstruction> instructions)
 {
     if (instructions != null)
         {
         foreach (var item in instructions)
             {
             this._instructions.Enqueue(item);
             }
         this._nextInstruction = this._instructions.Dequeue();
         }
 }
            public static TimedInstruction InitialState()
            {
                var result = new TimedInstruction(TimeSpan.Zero, Instruction.DoNothingInstruction());

                return(result);
            }
        public void ProcessInput(GameTime gameTime)
        {
            if (this._nextInstruction != null && gameTime.TotalGameTime >= this._nextInstruction.TakesEffectFrom)
                {
                this._currentInstruction = this._nextInstruction.Instruction;
                System.Diagnostics.Trace.WriteLine("ProcessInput changing to: " + this._currentInstruction);
                this._nextInstruction = this._instructions.Count != 0 ? this._instructions.Dequeue() : null;
                }

            this.Direction = this._currentInstruction.Direction;
            this.FireStatus1 = this._currentInstruction.FireStatus1;
            this.FireStatus2 = this._currentInstruction.FireStatus2;
            this._currentInstruction = Instruction.DoNothingInstruction();
        }
 public static TimedInstruction InitialState()
 {
     var result = new TimedInstruction(TimeSpan.Zero, Instruction.DoNothingInstruction());
     return result;
 }