Exemplo n.º 1
0
    private void InteractBase_OnNotifyInteract(ETypeOfInteract _typeOfInteract, bool _onOff, PlayerController _player)
    {
        player = _player;
        button.SetActive(_onOff);
        if (!_onOff)
        {
            return;
        }
        switch (_typeOfInteract)
        {
        case ETypeOfInteract.DOOR:
            text.text = textDoor;
            break;

        case ETypeOfInteract.ITEM:
            text.text = textItem;
            break;

        case ETypeOfInteract.CHAR:
            text.text = textChar;
            break;

        default:
            break;
        }
    }
Exemplo n.º 2
0
 public void CallNotify(ETypeOfInteract _typeOfInteract, bool _onOff, PlayerController _player)
 {
     OnNotifyInteract?.Invoke(_typeOfInteract, _onOff, _player);
 }