Exemplo n.º 1
0
        private void Events_OnAnimalFleeing(Animal nativeAnimal, ref Vector3 direction, ref bool sendToPack, out bool cancel)
        {
            UnturnedAnimal animal = new UnturnedAnimal(nativeAnimal);

            UnturnedAnimalFleeingEvent @event = new UnturnedAnimalFleeingEvent(animal, direction.ToSystemVector(), sendToPack);

            Emit(@event);

            direction  = @event.Direction.ToUnityVector();
            sendToPack = @event.SendToPack;
            cancel     = @event.IsCancelled;
        }
Exemplo n.º 2
0
        private void Events_OnAnimalFleeing(Animal nativeAnimal, ref Vector3 direction, ref bool sendToPack, ref bool cancel) // lgtm [cs/too-many-ref-parameters]
        {
            var animal = new UnturnedAnimal(nativeAnimal);

            var @event = new UnturnedAnimalFleeingEvent(animal, direction.ToSystemVector(), sendToPack)
            {
                IsCancelled = cancel
            };

            Emit(@event);

            direction = @event.Direction.ToUnityVector();
            sendToPack = @event.SendToPack;
            cancel = @event.IsCancelled;
        }