Exemplo n.º 1
0
    private void ToggleDoor()
    {
        isOpen = !isOpen;
        DoorInteract?.Invoke(isOpen);

        if (isOpen)
        {
            // Open
            OpenDoor();
        }
        else
        {
            // Close
            CloseDoor();
        }
    }
Exemplo n.º 2
0
            internal void Invoke079DoorInteract(
                Player player,
                Scp079EventMisc.DoorAction action,
                Scp079EventMisc.InteractionResult intendedResult,
                float energyNeeded,
                Door door,
                out Scp079EventMisc.InteractionResult actualResult
                )
            {
                var ev = new Scp079DoorInteractEventArgs
                {
                    Scp079       = player,
                    Action       = action,
                    EnergyNeeded = energyNeeded,
                    Result       = intendedResult,
                    Door         = door
                };

                DoorInteract?.Invoke(ev);

                actualResult = ev.Result;
            }