예제 #1
0
        public bool IsCrashed(StaticItem item)
        {
            bool overlapXCoordinate = CrashElementsHelper.IsTwoNumberBetweenRangeOfTowNumbers
                                          (this.X, this.XEnd, item.X, item.XEnd);

            bool overlapYCoordinate = CrashElementsHelper.IsTwoNumberBetweenRangeOfTowNumbers
                                          (this.Y, this.YEnd, item.Y, item.YEnd);

            bool crashed = overlapXCoordinate && overlapYCoordinate;

            return(crashed);
        }
예제 #2
0
 public static bool IsCrashedTwoElement(IVisualPlayer player1, StaticItem item)
 {
     return(player1.IsCrashed(item));
 }