Esempio n. 1
0
        private void SetInfo()
        {
            if (_iCurIndex < _arrCurText.Length)
            {
                string t = ConfigData.GetValue("Lan_Guide_Client", _arrCurText[_iCurIndex], "Text");
                Description.text = t;

                switch (PlayerInfo.GuideStep)
                {
                case 1:
                    BattleHeroListPanel.GetInst().SetActive(true);
                    _continueRect.sizeDelta = new Vector2(100, 100);
                    _continueRect.position  = BattleHeroListPanel.GetInst().GetShowBtnPos();
                    break;
                }
            }
            else
            {
                _gameObject.SetActive(false);
                switch (PlayerInfo.GuideStep)
                {
                case 0:
                    BattleManager.GetInst().m_BattleScene.OnBattleInit();
                    break;

                case 1:
                    BattleHeroListPanel.GetInst().ShowOrHide();
                    break;
                }
                SaveGuideStep(PlayerInfo.GuideStep + 1);
            }
        }
Esempio n. 2
0
        public CharHandler AddHero(int heroId, int heroLv, int heroIndex)
        {
            CharHandler h = SpawnHandler.GetInst().CreateHeroM(heroId, heroIndex);

            h.EnableChar();
            BattleHeroListPanel.GetInst().InsertBattleHero(heroId, heroLv, heroIndex);
            return(h);
        }
Esempio n. 3
0
        private void Awake()
        {
            m_Inst      = this;
            _gameObject = gameObject;
            _anim       = GetComponent <Animation>();
            BattleHeroListItem item;

            for (int i = 0; i < 5; ++i)
            {
                item           = ResourceLoader.LoadAssetAndInstantiate("PrefabUI/Battle/HeroList/BattleHeroListItem", ContentTrans).GetComponent <BattleHeroListItem>();
                item.HeroIndex = i;
                _lstHeroItem.Add(item);
            }
            _addHeroItem = ResourceLoader.LoadAssetAndInstantiate("PrefabUI/Battle/HeroList/BattleHeroListAddItem", ContentTrans).GetComponent <BattleHeroListAddItem>();
            ShowBtn.onClick.AddListener(ShowOrHide);

            InitAddPanel();

            SetActive(PlayerInfo.GuideStep > 1);
        }
Esempio n. 4
0
 public void HeroLevelUp(int heroIndex, int heroLv)
 {
     BattleHeroListPanel.GetInst().SetHeroLevel(heroIndex, heroLv);
 }
 private void OpenAddPanel()
 {
     BattleHeroListPanel.GetInst().ShowAddPanel(true, _curIndex, _iNeedCoin);
 }
Esempio n. 6
0
 private void OnDestroy()
 {
     m_Inst = null;
 }