Example #1
0
        public void Destroy()
        {
            for (var i = 0; i < CollidingWith.Count; i++)
            {
                CollidingWith[i].CollidingWith.Remove(this);
                CollidingWith[i].Entity.OnCollisionExit(Entity);
            }

            CollidingWith.Clear();
            CollisionManager.UnregisterCollider(this);
        }
Example #2
0
 private void CheckIfStanding()
 {
     if (CollidingWith.Count(o => (o.Key is Block) && ((o.Value & CollisionType.Bottom) == CollisionType.Bottom)) == 0)
     {
         _standing = false;
     }
     else
     {
         _standing = true;
     }
 }