Esempio n. 1
0
        private void OpenNewbieGuide(object index, object lastIndex)
        {
            if (newbieGuideView == null)
            {
                GameResourceLoadManager.GetInstance().LoadAssetAsync("NewbieUI", delegate(GameObject data)
                {
                    GameObject obj  = Instantiate(data) as GameObject;
                    newbieGuideView = obj.AddComponent <NewbieGuideView>();
                    ChangeUIViewDepthBySetParent(newbieGuideView.gameObject.transform, UIMenuDepth.LayerNewbie);

                    obj.transform.localPosition = Vector3.zero;
                    obj.transform.localScale    = Vector3.one;

                    RectTransform rectTrans = obj.GetComponent <RectTransform>();
                    rectTrans.sizeDelta     = Vector2.zero;

                    MessageDispatcher.PostMessage(MessageType.InitNewbieGuideSucceed);

                    newbieGuideView.Open(index, lastIndex);
                });
            }
            else
            {
                newbieGuideView.gameObject.SetActive(true);
                newbieGuideView.Open(index, lastIndex);
            }
        }
Esempio n. 2
0
        public NewbieGuideController(NewbieGuideView v)
        {
            view        = v;
            dataManager = DataManager.GetInstance();

            battleType = dataManager.GetBattleType();

            MessageDispatcher.AddObserver(TutorialModeReady, Constants.MessageType.TutorialModeReady);
            MessageDispatcher.AddObserver(view.GoNext, Constants.MessageType.TutorialGoNext);
            MessageDispatcher.AddObserver(view.TutorialStop, Constants.MessageType.TutorialStop);
            MessageDispatcher.AddObserver(view.TutorialFinish, Constants.MessageType.TutorialStageComplete);

            normallyGuidePathDic.Add(1, "BattleScreen,BattleBottomPanel/SquadCardItemGroup/SquadCard_Item");
            normallyGuidePathDic.Add(2, "BattleScreen,BattleBottomPanel/SquadCardItemGroup/SquadCard_Item (1)");
            normallyGuidePathDic.Add(3, "BattleScreen,BattleBottomPanel/SquadCardItemGroup/SquadCard_Item (2)");
            normallyGuidePathDic.Add(4, "BattleScreen,BattleLeftPanel/DragUnitCardPanel/UnitCardItemGroup/UnitCard_Item");
            normallyGuidePathDic.Add(10, "BattleScreen,BattleRightPanel/ControlRoot/ControlAni/ConcentratedFire/IconImage");

            bulidingGuidePathDic.Add(3, "AlertUI(Clone),ConfirmButton");
            bulidingGuidePathDic.Add(5, "BattleScreen,BattleCenterPanel/InstitutePopUp/DragInstituteSkillPanel/InstituteSkillGroup/InstituteSkillItem_0");
            bulidingGuidePathDic.Add(6, "BattleScreen,BattleCenterPanel/InstitutePopUp/LevelUpButton");
            bulidingGuidePathDic.Add(7, "BattleScreen,BattleCenterPanel/InstitutePopUp/CloseButton");
            bulidingGuidePathDic.Add(9, "BattleScreen,BattleCenterPanel/TowerPopUp/DragTowerItemPanel/TowerItemGroup/TowerItem_0/ClickButton");
        }