示例#1
0
        public void RefreshVoiceStateIfNess()
        {
            CUIFormScript statViewFormScript = this.m_statViewFormScript;

            if (statViewFormScript == null)
            {
                return;
            }
            if (!statViewFormScript.IsHided())
            {
                for (int i = 0; i < this.m_playerListCamp1.get_Count(); i++)
                {
                    if (i >= this._heroList0.Length)
                    {
                        break;
                    }
                    Player curPlayer = this.m_playerListCamp1.get_Item(i);
                    BattleStatView.HeroItem heroItem = this._heroList0[i];
                    heroItem.updateHeroVoiceState(curPlayer);
                }
                for (int i = 0; i < this.m_playerListCamp2.get_Count(); i++)
                {
                    if (i >= this._heroList1.Length)
                    {
                        break;
                    }
                    Player curPlayer = this.m_playerListCamp2.get_Item(i);
                    BattleStatView.HeroItem heroItem = this._heroList1[i];
                    heroItem.updateHeroVoiceState(curPlayer);
                }
            }
        }
        private void OnTimerWarmBattle(int timerSequence)
        {
            Singleton <CTimerManager> .instance.RemoveTimer(this.m_timerSeq);

            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(FightForm.s_battleUIForm);

            if (form != null && !form.IsHided())
            {
                this.m_timerSeq = -1;
                if (this.m_curCnt != this.m_maxCnt)
                {
                    this.m_curCnt++;
                    this.m_timerSeq = Singleton <CTimerManager> .instance.AddTimer(this.m_random.Next(500, 3000), 1, new CTimer.OnTimeUpHandler(this.OnTimerWarmBattle));

                    this.OpenSurrenderForm(this.m_maxCnt, this.m_curCnt, this.m_result);
                }
                else
                {
                    this.m_haveRights = true;
                    COM_PLAYERCAMP playerCamp = Singleton <GamePlayerCenter> .instance.GetHostPlayer().PlayerCamp;

                    BattleLogic.ForceKillCrystal((int)playerCamp);
                }
            }
        }
        public bool Porcess_CloseOtherForm()
        {
            CUIFormScript form = Singleton <CUIManager> .instance.GetForm(CBattleEquipSystem.s_equipFormPath);

            if (form != null && (!form.IsHided() || form.GetComponent <Canvas>().enabled))
            {
                Singleton <CUIManager> .instance.CloseForm(form);

                return(true);
            }
            CUIFormScript form2 = Singleton <CUIManager> .instance.GetForm(CSettingsSys.SETTING_FORM);

            if (form2 != null && !form2.IsHided())
            {
                Singleton <CUIManager> .instance.CloseForm(form2);

                return(true);
            }
            CUIFormScript form3 = Singleton <CUIManager> .instance.GetForm(BattleStatView.s_battleStateViewUIForm);

            if (form3 != null && (!form3.IsHided() || form3.GetComponent <Canvas>().enabled) && Singleton <CBattleSystem> .instance.BattleStatView != null)
            {
                Singleton <CBattleSystem> .instance.BattleStatView.Hide();

                return(true);
            }
            return(false);
        }
示例#4
0
    private void OnGetDetail(CUIEvent cuiEvent)
    {
        CUIFormScript form = Singleton <CUIManager> .instance.GetForm("UGUI/Form/System/AddedSkill/Form_AddedSkill.prefab");

        if ((form != null) && !form.IsHided())
        {
            CAddSkillView.OnRefresh(form.gameObject, (ushort)cuiEvent.m_eventParams.tag);
        }
    }
示例#5
0
        private void UpdateBattleState(CUIEvent evt = null)
        {
            if (null == this._root)
            {
                return;
            }
            CUIFormScript statViewFormScript = this.m_statViewFormScript;

            if (statViewFormScript == null)
            {
                return;
            }
            if (!statViewFormScript.IsHided())
            {
                for (int i = 0; i < this.m_playerListCamp1.get_Count(); i++)
                {
                    if (i >= this._heroList0.Length)
                    {
                        break;
                    }
                    Player curPlayer = this.m_playerListCamp1.get_Item(i);
                    BattleStatView.HeroItem heroItem = this._heroList0[i];
                    heroItem.updateReviceCD(curPlayer);
                    heroItem.updateTalentSkillCD(curPlayer, this.m_statViewFormScript);
                    if (this.m_battleHeroPropertyChange)
                    {
                        heroItem.updateHeroValue(curPlayer);
                    }
                }
                for (int i = 0; i < this.m_playerListCamp2.get_Count(); i++)
                {
                    if (i >= this._heroList1.Length)
                    {
                        break;
                    }
                    Player curPlayer = this.m_playerListCamp2.get_Item(i);
                    BattleStatView.HeroItem heroItem = this._heroList1[i];
                    heroItem.updateReviceCD(curPlayer);
                    heroItem.updateTalentSkillCD(curPlayer, this.m_statViewFormScript);
                    if (this.m_battleHeroPropertyChange)
                    {
                        heroItem.updateHeroValue(curPlayer);
                    }
                }
                if (this.m_battleHeroPropertyChange)
                {
                    this.m_battleHeroPropertyChange = false;
                }
            }
        }
示例#6
0
        private void UpdateKDAView()
        {
            if (null != this._root)
            {
                CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(s_battleStateViewUIForm);

                if ((form != null) && !form.IsHided())
                {
                    int index = 0;
                    index = 0;
                    while (index < this.m_heroListCamp1.Count)
                    {
                        if (index < this._heroList0.Length)
                        {
                            this._heroList0[index].Visible = true;
                            this._heroList0[index].Validate(this.m_heroListCamp1[index]);
                        }
                        index++;
                    }
                    while (index < this._heroList0.Length)
                    {
                        this._heroList0[index].Visible = false;
                        index++;
                    }
                    index = 0;
                    index = 0;
                    while (index < this.m_heroListCamp2.Count)
                    {
                        if (index < this._heroList1.Length)
                        {
                            this._heroList1[index].Visible = true;
                            this._heroList1[index].Validate(this.m_heroListCamp2[index]);
                        }
                        index++;
                    }
                    while (index < this._heroList1.Length)
                    {
                        this._heroList1[index].Visible = false;
                        index++;
                    }
                }
            }
        }
    protected override void Update()
    {
        if (base.isInitialize)
        {
            base.Update();
            return;
        }
        CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(FightForm.s_battleUIForm);

        if (form != null)
        {
            GameObject widget = form.GetWidget(47);
            DebugHelper.Assert(widget != null, "can't find equip item!");
            if (widget.activeInHierarchy && !form.IsHided())
            {
                base.AddHighLightGameObject(widget, true, form, true);
                base.Initialize();
            }
        }
    }
示例#8
0
        private void UpdateKDAView()
        {
            if (null == this._root)
            {
                return;
            }
            CUIFormScript statViewFormScript = this.m_statViewFormScript;

            if (statViewFormScript != null && !statViewFormScript.IsHided())
            {
                int i;
                for (i = 0; i < this.m_heroListCamp1.get_Count(); i++)
                {
                    if (i < this._heroList0.Length)
                    {
                        this._heroList0[i].Visible = true;
                        this._heroList0[i].Validate(this.m_heroListCamp1.get_Item(i));
                    }
                }
                while (i < this._heroList0.Length)
                {
                    this._heroList0[i].Visible = false;
                    i++;
                }
                for (i = 0; i < this.m_heroListCamp2.get_Count(); i++)
                {
                    if (i < this._heroList1.Length)
                    {
                        this._heroList1[i].Visible = true;
                        this._heroList1[i].Validate(this.m_heroListCamp2.get_Item(i));
                    }
                }
                while (i < this._heroList1.Length)
                {
                    this._heroList1[i].Visible = false;
                    i++;
                }
            }
        }