public RemoveCollision ( |
||
other | The CollisionUnit to remove the collision from. | |
return | void |
public void RemoveCollision(CollisionUnit other)
{
if (mCollisions.Remove(other))
{
bCollisionsChanged = true;
}
bHasCollisions = mCollisions.Count > 0;
}
/// <summary> /// Update the collision status between this and the <paramref name="other"/> CollisionUnit. /// </summary> /// <param name="other">The CollisionUnit to update.</param> public void UpdateCollisionsWith(CollisionUnit other) { if (CollidesWith(other)) { AddCollision(other); other.AddCollision(this); } else { RemoveCollision(other); other.RemoveCollision(this); } }