示例#1
0
 private void PhysicsModel_OnIntersection(Models.PhysicsModel a, Models.PhysicsModel b)
 {
     if (b != Owner.PhysicsModel)
     {
         b.MapObject.IsNeedDestroy = true;
         IsNeedDestroy             = true;
     }
 }
示例#2
0
        private void PhysicsModel_OnIntersection(Models.PhysicsModel a, Models.PhysicsModel b)
        {
            Console.WriteLine("bullet intersection!");
            if (b != Owner.PhysicsModel)
            {
                ((Character)b.MapObject).Hp -= 10;

                if (((Character)b.MapObject).Hp <= 0)
                {
                    b.MapObject.IsNeedDestroy = true;
                }
                IsNeedDestroy = true;
            }
        }