Пример #1
0
            public void updateTalentSkillCD(Player curPlayer, CUIFormScript parentFormScript)
            {
                if (curPlayer == null || !curPlayer.Captain || curPlayer.Captain.get_handle().SkillControl == null)
                {
                    return;
                }
                SkillSlot skillSlot = curPlayer.Captain.get_handle().SkillControl.SkillSlotArray[5];

                if (skillSlot == null)
                {
                    this.talentSkill.CustomSetActive(false);
                }
                else
                {
                    if (!string.IsNullOrEmpty(skillSlot.SkillObj.IconName))
                    {
                        this.talentSkillImage.SetSprite(CUIUtility.s_Sprite_Dynamic_Skill_Dir + skillSlot.SkillObj.IconName, parentFormScript, true, false, false, false);
                    }
                    this.talentSkill.CustomSetActive(true);
                    if (skillSlot.CurSkillCD > 0)
                    {
                        this.talentSkillCD.text     = SimpleNumericString.GetNumeric(Mathf.FloorToInt((float)skillSlot.CurSkillCD * 0.001f));
                        this.talentSkillImage.color = CUIUtility.s_Color_Grey;
                    }
                    else
                    {
                        this.talentSkillCD.text     = string.Empty;
                        this.talentSkillImage.color = CUIUtility.s_Color_Full;
                    }
                }
            }
Пример #2
0
 public void updateTalentSkillCD(Player curPlayer)
 {
     if (((curPlayer != null) && (curPlayer.Captain != 0)) && (curPlayer.Captain.handle.SkillControl != null))
     {
         SkillSlot slot = curPlayer.Captain.handle.SkillControl.SkillSlotArray[5];
         if (slot == null)
         {
             this.talentSkill.CustomSetActive(false);
         }
         else
         {
             if (!string.IsNullOrEmpty(slot.SkillObj.IconName))
             {
                 this.talentSkillImage.SetSprite(CUIUtility.s_Sprite_Dynamic_Skill_Dir + slot.SkillObj.IconName, Singleton <CUIManager> .GetInstance().GetForm(BattleStatView.s_battleStateViewUIForm), true, false, false);
             }
             this.talentSkill.CustomSetActive(true);
             if (slot.CurSkillCD > 0)
             {
                 this.talentSkillCD.text     = SimpleNumericString.GetNumeric(Mathf.FloorToInt(((float)slot.CurSkillCD) * 0.001f));
                 this.talentSkillImage.color = CUIUtility.s_Color_Grey;
             }
             else
             {
                 this.talentSkillCD.text     = string.Empty;
                 this.talentSkillImage.color = CUIUtility.s_Color_Full;
             }
         }
     }
 }
Пример #3
0
        public void Update()
        {
            if (null == this.heroInfoList)
            {
                return;
            }
            int count = this.m_teamHeroList.get_Count();

            for (int i = 0; i < count; i++)
            {
                PoolObjHandle <ActorRoot> ptr      = this.m_teamHeroList.get_Item(i);
                CUIListElementScript      elemenet = this.heroInfoList.GetElemenet(i);
                if (ptr && ptr.handle.SkillControl != null && !(null == elemenet))
                {
                    SkillSlot skillSlot = null;
                    if (ptr.handle.SkillControl.TryGetSkillSlot(SkillSlotType.SLOT_SKILL_3, out skillSlot) && skillSlot.IsUnLock() && skillSlot.IsCDReady)
                    {
                        elemenet.GetWidget(6).CustomSetActive(true);
                    }
                    else
                    {
                        elemenet.GetWidget(6).CustomSetActive(false);
                    }
                    int num = this.m_heroInfoChangeBitsList[i];
                    if (num != 0)
                    {
                        if ((num & 1) != 0)
                        {
                            Image hpImage = this.GetHpImage(i);
                            if (hpImage != null)
                            {
                                hpImage.set_fillAmount(ptr.handle.ValueComponent.GetHpRate().single);
                            }
                            num &= -2;
                        }
                        Text reviveText = this.GetReviveText(i);
                        if (reviveText != null && (num & 2) != 0)
                        {
                            reviveText.set_text(SimpleNumericString.GetNumeric(Mathf.RoundToInt((float)ptr.handle.ActorControl.ReviveCooldown * 0.001f)));
                        }
                        this.m_heroInfoChangeBitsList[i] = num;
                    }
                }
            }
            int count2 = this.m_enemyHeroList.get_Count();

            for (int j = 0; j < count2; j++)
            {
                CUIListElementScript elemenet2 = this.heroInfoList.GetElemenet(j + 5);
                if (elemenet2 != null && this.m_enemyHeroList.get_Item(j))
                {
                    Text reviveText2 = this.GetReviveText(j + 5);
                    if (reviveText2 != null)
                    {
                        reviveText2.set_text(SimpleNumericString.GetNumeric(Mathf.RoundToInt((float)this.m_enemyHeroList.get_Item(j).handle.ActorControl.ReviveCooldown * 0.001f)));
                    }
                }
            }
        }
Пример #4
0
 private void RefreshHeroReviveCntDown(CUIListElementScript elementScript, PoolObjHandle <ActorRoot> actor)
 {
     if ((null != elementScript) && (actor != 0))
     {
         GameObject widget = elementScript.GetWidget(5);
         if ((widget != null) && actor.handle.ActorControl.IsDeadState)
         {
             widget.GetComponent <Text>().text = SimpleNumericString.GetNumeric(Mathf.RoundToInt(actor.handle.ActorControl.ReviveCooldown * 0.001f));
         }
     }
 }
Пример #5
0
        private void RefreshHeroReviveCntDown(CUIListElementScript elementScript, PoolObjHandle <ActorRoot> actor)
        {
            if (null == elementScript || !actor)
            {
                return;
            }
            GameObject widget = elementScript.GetWidget(5);

            if (widget != null && actor.handle.ActorControl.IsDeadState)
            {
                widget.GetComponent <Text>().set_text(SimpleNumericString.GetNumeric(Mathf.RoundToInt((float)actor.handle.ActorControl.ReviveCooldown * 0.001f)));
            }
        }
Пример #6
0
        private void UpdateSelfKDADisplay()
        {
            CPlayerKDAStat playerKDAStat = Singleton <BattleLogic> .GetInstance().battleStat.m_playerKDAStat;

            if (playerKDAStat != null)
            {
                PlayerKDA hostKDA = playerKDAStat.GetHostKDA();
                if ((hostKDA != null) && (this._root != null))
                {
                    Utility.GetComponetInChild <Text>(this._root, "Kill").text   = SimpleNumericString.GetNumeric(hostKDA.numKill);
                    Utility.GetComponetInChild <Text>(this._root, "Death").text  = SimpleNumericString.GetNumeric(hostKDA.numDead);
                    Utility.GetComponetInChild <Text>(this._root, "Assist").text = SimpleNumericString.GetNumeric(hostKDA.numAssist);
                }
            }
        }
Пример #7
0
 public void updateReviceCD(Player curPlayer)
 {
     if (((curPlayer != null) && (curPlayer.Captain != 0)) && (curPlayer.Captain.handle.ActorControl != null))
     {
         if (curPlayer.Captain.handle.ActorControl.IsDeadState)
         {
             this.reviveTime.text = SimpleNumericString.GetNumeric(Mathf.FloorToInt(curPlayer.Captain.handle.ActorControl.ReviveCooldown * 0.001f));
             this.icon.color      = CUIUtility.s_Color_Grey;
         }
         else
         {
             this.reviveTime.text = string.Empty;
             this.icon.color      = CUIUtility.s_Color_Full;
         }
     }
 }
Пример #8
0
 public void updateReviceCD(Player curPlayer)
 {
     if (curPlayer == null || !curPlayer.Captain || curPlayer.Captain.get_handle().ActorControl == null)
     {
         return;
     }
     if (curPlayer.Captain.get_handle().ActorControl.IsDeadState)
     {
         this.reviveTime.text = SimpleNumericString.GetNumeric(Mathf.FloorToInt((float)curPlayer.Captain.get_handle().ActorControl.ReviveCooldown * 0.001f));
         this.icon.color      = CUIUtility.s_Color_Grey;
     }
     else
     {
         this.reviveTime.text = string.Empty;
         this.icon.color      = CUIUtility.s_Color_Full;
     }
 }
Пример #9
0
        private void UpdateSelfKDADisplay()
        {
            CPlayerKDAStat playerKDAStat = Singleton <BattleLogic> .GetInstance().battleStat.m_playerKDAStat;

            if (playerKDAStat == null)
            {
                return;
            }
            PlayerKDA hostKDA = playerKDAStat.GetHostKDA();

            if (hostKDA == null || this._root == null)
            {
                return;
            }
            Utility.GetComponetInChild <Text>(this._root, "Kill").set_text(SimpleNumericString.GetNumeric(hostKDA.numKill));
            Utility.GetComponetInChild <Text>(this._root, "Death").set_text(SimpleNumericString.GetNumeric(hostKDA.numDead));
            Utility.GetComponetInChild <Text>(this._root, "Assist").set_text(SimpleNumericString.GetNumeric(hostKDA.numAssist));
        }
Пример #10
0
        public void CreateBattleFloatDigit(int digitValue, DIGIT_TYPE digitType, ref Vector3 worldPosition, int animatIndex)
        {
            if (GameSettings.RenderQuality == SGameRenderQuality.Low && digitType != DIGIT_TYPE.MagicAttackCrit && digitType != DIGIT_TYPE.PhysicalAttackCrit && digitType != DIGIT_TYPE.RealAttackCrit && digitType != DIGIT_TYPE.ReceiveGoldCoinInBattle)
            {
                return;
            }
            string[] array = CBattleFloatDigitManager.s_battleFloatDigitAnimatorStates[(int)digitType];
            if (array.Length <= 0 || animatIndex < 0 || animatIndex >= array.Length)
            {
                return;
            }
            string content = ((digitType == DIGIT_TYPE.ReceiveSpirit && digitValue > 0) ? "+" : string.Empty) + SimpleNumericString.GetNumeric(Mathf.Abs(digitValue));

            this.CreateBattleFloatText(content, ref worldPosition, array[animatIndex], 0u);
        }
Пример #11
0
 public void Update()
 {
     if (null != this.heroInfoList)
     {
         int count = this.m_teamHeroList.Count;
         CUIListElementScript elemenet = null;
         int num2  = 0;
         int index = 0;
         index = 0;
         while (index < count)
         {
             PoolObjHandle <ActorRoot> handle = this.m_teamHeroList[index];
             elemenet = this.heroInfoList.GetElemenet(index);
             if (((handle != 0) && (handle.handle.SkillControl != null)) && (null != elemenet))
             {
                 SkillSlot slot = null;
                 if ((handle.handle.SkillControl.TryGetSkillSlot(SkillSlotType.SLOT_SKILL_3, out slot) && slot.IsUnLock()) && slot.IsCDReady)
                 {
                     elemenet.GetWidget(6).CustomSetActive(true);
                 }
                 else
                 {
                     elemenet.GetWidget(6).CustomSetActive(false);
                 }
                 num2 = this.m_heroInfoChangeBitsList[index];
                 if (num2 != 0)
                 {
                     if ((num2 & 1) != 0)
                     {
                         Image hpImage = this.GetHpImage(index);
                         if (hpImage != null)
                         {
                             hpImage.fillAmount = handle.handle.ValueComponent.GetHpRate().single;
                         }
                         num2 &= -2;
                     }
                     Text reviveText = this.GetReviveText(index);
                     if ((reviveText != null) && ((num2 & 2) != 0))
                     {
                         reviveText.text = SimpleNumericString.GetNumeric(Mathf.RoundToInt(handle.handle.ActorControl.ReviveCooldown * 0.001f));
                     }
                     this.m_heroInfoChangeBitsList[index] = num2;
                 }
             }
             index++;
         }
         int num4 = this.m_enemyHeroList.Count;
         for (index = 0; index < num4; index++)
         {
             if ((this.heroInfoList.GetElemenet(index + 5) != null) && (this.m_enemyHeroList[index] != 0))
             {
                 Text text2 = this.GetReviveText(index + 5);
                 if (text2 != null)
                 {
                     PoolObjHandle <ActorRoot> handle2 = this.m_enemyHeroList[index];
                     text2.text = SimpleNumericString.GetNumeric(Mathf.RoundToInt(handle2.handle.ActorControl.ReviveCooldown * 0.001f));
                 }
             }
         }
     }
 }
Пример #12
0
 public void CreateBattleFloatDigit(int digitValue, DIGIT_TYPE digitType, ref Vector3 worldPosition, int animatIndex)
 {
     if ((((GameSettings.RenderQuality != SGameRenderQuality.Low) || (digitType == DIGIT_TYPE.MagicAttackCrit)) || ((digitType == DIGIT_TYPE.PhysicalAttackCrit) || (digitType == DIGIT_TYPE.RealAttackCrit))) || (digitType == DIGIT_TYPE.ReceiveGoldCoinInBattle))
     {
         string[] strArray = s_battleFloatDigitAnimatorStates[(int)digitType];
         if (((strArray.Length > 0) && (animatIndex >= 0)) && (animatIndex < strArray.Length))
         {
             string content = (((digitType != DIGIT_TYPE.ReceiveSpirit) || (digitValue <= 0)) ? string.Empty : "+") + SimpleNumericString.GetNumeric(Mathf.Abs(digitValue));
             this.CreateBattleFloatText(content, ref worldPosition, strArray[animatIndex], 0);
         }
     }
 }