public void InteractWithNpc(NpcController instance) { if (instance == null) { return; } _curInstance = instance; ShowNpcStatus(); ShowNpcDialogue(); }
public void ShowNpcStatus() { if (_curInstance != _pastInstance && _pastInstance != null) { _pastInstance.SetActiveCircle(false); } _interactiveStatus._gameObj.SetActive(true); _interactiveStatus._name.text = _curInstance.npcName; _curInstance.SetActiveCircle(true); _curInstance.ChangeActiveCircle(_curInstance.isCombat); _pastInstance = _curInstance; }
protected void Init() { _instance = this; if (_playerContoller == null) { _playerContoller = GameObject.Find("Player").GetComponent <PlayerController>(); } if (_playerHp == null) { _playerHp = GameObject.Find("Player").GetComponent <PlayerHp>(); } if (_activedCircle.activeInHierarchy) { _activedCircle.SetActive(false); } _animator = this.GetComponent <Animator>(); }
public void HideNpcStatus() { _curInstance = null; _interactiveStatus._gameObj.SetActive(false); }