Exemplo n.º 1
0
 public void Handle(PerformedCollisionEvent msg)
 {
     if (msg.Origin.Entity.HasComponent <DespawnOnCollision>())
     {
         msg.Origin.Entity.Destroy();
     }
 }
Exemplo n.º 2
0
        public void Handle(PerformedCollisionEvent arg)
        {
            var data = arg.Origin.Entity.Find <ActionFxComponent>()?.Value;

            if (data != null)
            {
                TriggerCollisionEvent(data, arg.HitPoint, arg.HitNormal, arg.Target?.Entity);
            }
        }
Exemplo n.º 3
0
        public void Handle(PerformedCollisionEvent arg)
        {
            var data = arg.Origin.Entity.Find <ActionFxComponent>()?.Fx;

            if (data != null)
            {
                data.TriggerEvent(
                    new ActionStateEvent(
                        arg.Origin, arg.Target, arg.HitPoint + (arg.HitNormal * 0.1f), Quaternion.LookRotation(arg.HitNormal),
                        ActionStateEvents.Collision));
            }
        }