Esempio n. 1
0
 /// <summary>
 /// Ares the square hitbox of the gameobjects superposing.
 /// </summary>
 /// <param name="go">The gameobject to test the collision </param>
 /// <returns> True if gameobjects collide </returns>
 public bool AreSquareSuperposing(GameObject go)
 {
     return(!(go.GetAnchorX() > GetAnchorX() + Size.X ||
              go.GetAnchorY() > GetAnchorY() + Size.Y ||
              GetAnchorX() > go.GetAnchorX() + go.Size.X ||
              GetAnchorY() > go.GetAnchorY() + go.Size.Y));
 }