示例#1
0
        private void Events_OnZombieAlertingPosition(Zombie nativeZombie, ref Vector3 position, ref bool isStartling, out bool cancel)
        {
            UnturnedZombie zombie = new UnturnedZombie(nativeZombie);

            UnturnedZombieAlertingPositionEvent @event = new UnturnedZombieAlertingPositionEvent(zombie, position, isStartling);

            Emit(@event);

            position    = @event.Position;
            isStartling = @event.IsStartling;
            cancel      = @event.IsCancelled;
        }
示例#2
0
        private void Events_OnZombieAlertingPosition(Zombie nativeZombie, ref Vector3 position, ref bool isStartling, ref bool cancel) // lgtm [cs/too-many-ref-parameters]
        {
            var zombie = new UnturnedZombie(nativeZombie);

            var @event = new UnturnedZombieAlertingPositionEvent(zombie, position, isStartling)
            {
                IsCancelled = cancel
            };

            Emit(@event);

            position    = @event.Position;
            isStartling = @event.IsStartling;
            cancel      = @event.IsCancelled;
        }