Example #1
0
 /// <summary>
 /// Returns wether or not two sprites collide
 /// </summary>
 /// <param name="sprite">The sprite to check the collision on</param>
 /// <returns>A true if the sprites collide a false if they do not</returns>
 public bool wouldCollide(Sprite sprite)
 {
     if (!this.collidable || !sprite.isCollidable())
         return false;
     if (getCellRectangle().Intersects(sprite.getCellRectangle()))
         return true;
     return false;
 }