Ejemplo n.º 1
0
        public override bool VerifyCollision(ITouchable other)
        {
            var colliding = CollisionBounds.IntersectsWith(other.CollisionBounds);

            if (!(other is Shape) && colliding)
            {
                this.colliding = true;
            }
            return(colliding);
        }
Ejemplo n.º 2
0
 public bool VerifyCollision(ITouchable other)
 {
     if (other is Shoot shoot)
     {
         if (shoot.Cannon.Support == this)
         {
             return(false);
         }
     }
     return(CollisionBounds.IntersectsWith(other.CollisionBounds));
 }
Ejemplo n.º 3
0
        public override bool VerifyCollision(ITouchable other)
        {
            var colliding = CollisionBounds.IntersectsWith(other.CollisionBounds);

            if (!(other is Block) && colliding)
            {
                return(this.colliding = true);
            }
            else
            {
                return(colliding);
            }
        }
Ejemplo n.º 4
0
 public override bool VerifyCollision(ITouchable other)
 {
     return(CollisionBounds.IntersectsWith(other.CollisionBounds));
 }
Ejemplo n.º 5
0
 /// <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));
 }
Ejemplo n.º 6
0
 /// <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));
 }