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); }
public static bool IsCrashedTwoElement(IVisualPlayer player1, StaticItem item) { return(player1.IsCrashed(item)); }