Exemplo n.º 1
0
 private void AppleFloorContacted(object sender, CollideEventArg collide)
 {
     if (collide.Dictionary.ContainsKey(BodyId) && collide.Dictionary[BodyId].Contains(_floor))
     {
         Body.Restitution = 0f;
         _isFalling       = false;
         CurrentWorld.RemoveBody(_floor);
         Body.CollisionCategories = Category.All & ~Category.Cat10;
         Body.CollidesWith        = Category.All & ~Category.Cat10;
         _tree.Apple = null;
         CurrentWorld.AddDynamicEntity(this);
         CanInteract = true;
     }
 }