예제 #1
0
 /// <summary> Sets direction field depending on flags in InGameUI class. </summary>
 void CheckingDirection()
 {
     if (inGameUI.RightPressed)
     {
         direction++;
         inGameUI.ResetBools();
         if (direction >= 4)
         {
             direction = 0;
         }
     }
     else if (inGameUI.LeftPressed)
     {
         direction--;
         inGameUI.ResetBools();
         if (direction <= -1)
         {
             direction = 3;
         }
     }
 }