Example #1
0
 void MovingRight_EnterState()
 {
     if (debug)
     {
         Debug.Log("Entering MovingRight State");
     }
     _transform.forward = Vector3.right;
     Debug.Log("Right: " + _transform.position);
     nextState = SnakeMover2States.MovingRight;
 }
Example #2
0
 void MovingDown_Update()
 {
     this.move();
     if (pressedLeft())
     {
         this.nextState = SnakeMover2States.DownToLeft;
     }
     if (pressedRight())
     {
         this.nextState = SnakeMover2States.DownToRight;
     }
 }
Example #3
0
 void MovingLeft_Update()
 {
     this.move();
     if (pressedUp())
     {
         nextState = SnakeMover2States.LeftToUp;
     }
     if (pressedDown())
     {
         nextState = SnakeMover2States.LeftToDown;
     }
 }
Example #4
0
 void DownToLeft_Update()
 {
     this.nextState = SnakeMover2States.MovingLeft;
 }
Example #5
0
 void UpToRight_Update()
 {
     this.nextState = SnakeMover2States.MovingRight;
 }
Example #6
0
 void LeftToDown_Update()
 {
     this.nextState = SnakeMover2States.MovingDown;
 }
Example #7
0
 void LeftToUp_Update()
 {
     this.nextState = SnakeMover2States.MovingUp;
 }
Example #8
0
 void MovingLeft_Update()
 {
     this.move();
     if (pressedUp())
         nextState = SnakeMover2States.LeftToUp;
     if (pressedDown())
         nextState = SnakeMover2States.LeftToDown;
 }
Example #9
0
 void UpToRight_Update()
 {
     this.nextState =  SnakeMover2States.MovingRight;
 }
Example #10
0
 void RightToUp_Update()
 {
     this.nextState =  SnakeMover2States.MovingUp;
 }
Example #11
0
 void RightToDown_Update()
 {
     this.nextState =  SnakeMover2States.MovingDown;
 }
Example #12
0
    void MovingUp_Update()
    {
        this.move();

        if (pressedLeft())
            this.nextState = SnakeMover2States.UpToLeft;
        if (pressedRight())
            this.nextState = SnakeMover2States.UpToRight;
    }
Example #13
0
    void MovingRight_Update()
    {
        this.move();

        if (pressedUp())
        {
            nextState = SnakeMover2States.RightToUp;
        }
        if (pressedDown())
            nextState = SnakeMover2States.RightToDown;
    }
Example #14
0
 void MovingRight_EnterState()
 {
     if (debug)
         Debug.Log("Entering MovingRight State");
     _transform.forward = Vector3.right;
     Debug.Log("Right: " +_transform.position);
     nextState = SnakeMover2States.MovingRight;
 }
Example #15
0
 void DownToRight_Update()
 {
     nextState = SnakeMover2States.MovingRight;
 }
Example #16
0
 void DownToLeft_Update()
 {
     this.nextState =  SnakeMover2States.MovingLeft;
 }
Example #17
0
 void DownToRight_Update()
 {
     nextState = SnakeMover2States.MovingRight;
 }