Esempio n. 1
0
        public bool IsCrashed(IVisualPlayer player)
        {
            bool overlapXCoordinate = CrashElementsHelper.IsTwoNumberBetweenRangeOfTowNumbers
                                          (this.X, this.XEnd, player.X, player.XEnd);
            bool overlapYCoordinate = CrashElementsHelper.IsTwoNumberBetweenRangeOfTowNumbers
                                          (this.Y, this.YEnd, player.Y, player.YEnd);

            bool crashed = overlapXCoordinate && overlapYCoordinate;

            return(crashed);
        }
Esempio n. 2
0
 public static bool IsCrashedTwoElement(IVisualPlayer player1, StaticItem item)
 {
     return(player1.IsCrashed(item));
 }
Esempio n. 3
0
 public static bool IsCrashedTwoElement(IVisualPlayer player1, IVisualPlayer player2)
 {
     return(player1.IsCrashed(player2));
 }
Esempio n. 4
0
 public static void MoveRight(IVisualPlayer player)
 {
     player.MoveRight();
 }
Esempio n. 5
0
 public static void MoveDown(IVisualPlayer player)
 {
     player.MoveDown();
 }
Esempio n. 6
0
 public static void MoveUp(IVisualPlayer player)
 {
     player.MoveUp();
 }