示例#1
0
        public void InteractWithNpc(NpcController instance)
        {
            if (instance == null)
            {
                return;
            }

            _curInstance = instance;

            ShowNpcStatus();
            ShowNpcDialogue();
        }
示例#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;
        }
示例#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>();
        }
示例#4
0
 public void HideNpcStatus()
 {
     _curInstance = null;
     _interactiveStatus._gameObj.SetActive(false);
 }