Reset() public abstract method

public abstract Reset ( ) : Instruction
return Instruction
Example #1
0
        public override InstructionResult Execute(float dt)
        {
            switch (body.Execute(dt))
            {
            case InstructionResult.Done:
                body = body.Reset();
                return(InstructionResult.Running);

            case InstructionResult.DoneAndCreateAsteroid:
                body = body.Reset();
                return(InstructionResult.RunningAndCreateAsteroid);

            case InstructionResult.Running:
                return(InstructionResult.Running);

            case InstructionResult.RunningAndCreateAsteroid:
                return(InstructionResult.RunningAndCreateAsteroid);
            }
            return(InstructionResult.Running);
        }
Example #2
0
 public override InstructionResult Execute(float dt)
 {
     switch (body.Execute(dt))
       {
     case InstructionResult.Done:
       body = body.Reset();
       return InstructionResult.Running;
     case InstructionResult.DoneAndCreateAsteroid:
       body = body.Reset();
       return InstructionResult.RunningAndCreateAsteroid;
     case InstructionResult.Running:
       return InstructionResult.Running;
     case InstructionResult.RunningAndCreateAsteroid:
       return InstructionResult.RunningAndCreateAsteroid;
       }
       return InstructionResult.Running;
 }
Example #3
0
 public override Instruction Reset()
 {
     return(new Semicolon(A.Reset(), B.Reset()));
 }