예제 #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);
        }
예제 #2
0
 public static bool IsCrashedTwoElement(IVisualPlayer player1, StaticItem item)
 {
     return(player1.IsCrashed(item));
 }
예제 #3
0
 public static bool IsCrashedTwoElement(IVisualPlayer player1, IVisualPlayer player2)
 {
     return(player1.IsCrashed(player2));
 }
예제 #4
0
 public static void MoveRight(IVisualPlayer player)
 {
     player.MoveRight();
 }
예제 #5
0
 public static void MoveDown(IVisualPlayer player)
 {
     player.MoveDown();
 }
예제 #6
0
 public static void MoveUp(IVisualPlayer player)
 {
     player.MoveUp();
 }