Example #1
0
        private void Events_OnAnimalAttackingPoint(Animal nativeAnimal, ref Vector3 point, ref bool sendToPack, out bool cancel)
        {
            UnturnedAnimal animal = new UnturnedAnimal(nativeAnimal);

            UnturnedAnimalAttackingPointEvent @event = new UnturnedAnimalAttackingPointEvent(animal, point.ToSystemVector(), sendToPack);

            Emit(@event);

            point      = @event.Point.ToUnityVector();
            sendToPack = @event.SendToPack;
            cancel     = @event.IsCancelled;
        }
Example #2
0
        private void Events_OnAnimalAttackingPoint(Animal nativeAnimal, ref Vector3 point, ref bool sendToPack, ref bool cancel) // lgtm [cs/too-many-ref-parameters]
        {
            var animal = new UnturnedAnimal(nativeAnimal);

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

            Emit(@event);

            point = @event.Point.ToUnityVector();
            sendToPack = @event.SendToPack;
            cancel = @event.IsCancelled;
        }