コード例 #1
0
 public virtual void OnInteractionExited(InteratibleDeviceComponent Device)
 {
     if (_currentDevice == Device)
     {
         _currentDevice = null;
     }
 }
コード例 #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();
            }
        }
    }
コード例 #3
0
 public virtual void OnInteractionEntered(InteratibleDeviceComponent Device)
 {
     _currentDevice = Device;
 }