Exemplo n.º 1
0
        public void InteractWithNpc(NpcController instance)
        {
            if (instance == null)
            {
                return;
            }

            _curInstance = instance;

            ShowNpcStatus();
            ShowNpcDialogue();
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
        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>();
        }
Exemplo n.º 4
0
 public void HideNpcStatus()
 {
     _curInstance = null;
     _interactiveStatus._gameObj.SetActive(false);
 }