public override bool VerifyCollision(ITouchable other) { var colliding = CollisionBounds.IntersectsWith(other.CollisionBounds); if (!(other is Shape) && colliding) { this.colliding = true; } return(colliding); }
public bool VerifyCollision(ITouchable other) { if (other is Shoot shoot) { if (shoot.Cannon.Support == this) { return(false); } } return(CollisionBounds.IntersectsWith(other.CollisionBounds)); }
public override bool VerifyCollision(ITouchable other) { var colliding = CollisionBounds.IntersectsWith(other.CollisionBounds); if (!(other is Block) && colliding) { return(this.colliding = true); } else { return(colliding); } }
public override bool VerifyCollision(ITouchable other) { return(CollisionBounds.IntersectsWith(other.CollisionBounds)); }
/// <summary> /// Kolize s obdelnikem /// </summary> /// <param name="rectangle"> /// Bounding box objektu se kterym se kontroluje kolize /// </param> /// <returns></returns> public virtual bool RectIntersects(Rect rectangle) { return(CollisionBounds.IntersectsWith(rectangle)); }
/// <summary> /// Kontrola jestli doslo ke kolizi /// </summary> /// <param name="gameObject"> /// Objekt se kterym doslo ke kolizi /// </param> /// <returns></returns> public virtual bool Intersects(IGameObject gameObject) { return(CollisionBounds.IntersectsWith(gameObject.CollisionBounds)); }