示例#1
0
        protected override void Init()
        {
            _npcDialogModel        = Singleton <NpcDialogModel> .Instance;
            _dialogButton          = FindChild("Buttom/Button").GetComponent <Button>();
            _dialogButton.onClick += OnDialogButtonClick;
            _dialogPlayerLabel     = FindChild("Buttom/Content/leftLabel").GetComponent <UILabel>();
            _dialogNpcLabel        = FindChild("Buttom/Content/rightLabel").GetComponent <UILabel>();
            _speakBackground       = FindChild("Buttom/Content/Background").GetComponent <UISprite>();
            _npcHead         = FindChild("Buttom/Npc");
            _npcNameLabel    = FindChild("Buttom/Npc/Name").GetComponent <UILabel>();
            _npcSprite       = FindChild("Buttom/Npc/FaceIcon").GetComponent <UISprite>();
            _playerHead      = FindChild("Buttom/Player");
            _playerNameLabel = FindChild("Buttom/Player/Name").GetComponent <UILabel>();
            _playerSprite    = FindChild("Buttom/Player/FaceIcon").GetComponent <UISprite>();

            /*_npcTaskView = Singleton<NpcTaskView>.Instance;
             * _npcTaskView.gameObject = FindChild("NpcTaskView");
             * _npcTaskView.transform = _npcTaskView.gameObject.transform;
             * _npcTaskView.Init();*/
            /*_npcFunctionView = Singleton<NpcFunctionView>.Instance;
             * _npcFunctionView.gameObject = FindChild("FunctionView");
             * _npcFunctionView.transform = _npcFunctionView.gameObject.transform;
             * _npcFunctionView.Init();*/
            _taskModel      = Singleton <TaskModel> .Instance;
            _npcDialogModel = Singleton <NpcDialogModel> .Instance;
            _wordsList      = new List <string>();
        }
示例#2
0
        private bool _isDialog;  //是否是在对话

        public new void Init()
        {
            _npcSpeakLabel       = FindChild("NpcSpeak/Label").GetComponent <UILabel>();
            _taskInfoLabel       = FindChild("TaskInfo/Label").GetComponent <UILabel>();
            _taskButton          = FindChild("Button").GetComponent <Button>();
            _npcDialogModel      = Singleton <NpcDialogModel> .Instance;
            _taskModel           = Singleton <TaskModel> .Instance;
            _wordsList           = new List <string>();
            _talkIndex           = 0;
            _taskButton.onClick += OnTaskButtonClick;
        }
示例#3
0
        public new void Init()
        {
            _npcSpeakLabel = FindChild("NpcSpeak/Label").GetComponent <UILabel>();

            _npcDialogModel = Singleton <NpcDialogModel> .Instance;
        }