Esempio n. 1
0
 public void ChangeDirection(YeasterDirection dir)
 {
     if (GameData.IsTurnable(direct, dir))
     {
         direct = dir;
     }
 }
Esempio n. 2
0
 public static bool IsTurnable(YeasterDirection from, YeasterDirection to)
 {
     return((to == YeasterDirection.Left && from != YeasterDirection.Right) ||
            (to == YeasterDirection.Right && from != YeasterDirection.Left) ||
            (to == YeasterDirection.Up && from != YeasterDirection.Down) ||
            (to == YeasterDirection.Down && from != YeasterDirection.Up));
 }
Esempio n. 3
0
 public void InitializeDirection(YeasterDirection dir)
 {
     direct = dir;
 }