Ejemplo 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);
        }
Ejemplo n.º 2
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);
        }