private void UpdateInteraction()
    {
        bool isInteractionPressed = _rewiredPlayer.GetButtonDown(RewiredConsts.Action.Interact);

        if (_astronaut != null && isInteractionPressed)
        {
            _astronaut.PressInteraction();
        }
    }
Beispiel #2
0
    private void UpdateInteraction()
    {
        if (_isInteractionPressed && _astronaut.RoomInhabitant.CurrentDevice != null)
        {
            bool shouldInteract = true;
            InteratibleDeviceComponent device     = _astronaut.RoomInhabitant.CurrentDevice;
            RepairableDeviceComponent  repairable = device as RepairableDeviceComponent;
            if (repairable != null)
            {
                if (repairable.CurrentRepairState == RepairableDeviceComponent.ERepairState.Broken)
                {
                    shouldInteract = false;
                }
            }

            if (shouldInteract)
            {
                _astronaut.PressInteraction();
            }
        }
    }