public virtual void OnInteractionExited(InteratibleDeviceComponent Device)
 {
     if (_currentDevice == Device)
     {
         _currentDevice = null;
     }
 }
Esempio n. 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();
            }
        }
    }
 public virtual void OnInteractionEntered(InteratibleDeviceComponent Device)
 {
     _currentDevice = Device;
 }