Beispiel #1
0
 private void HeroUpdateProperty(ArkCrossEngine.CharacterProperty info, ArkCrossEngine.Network.GeneralOperationResult result)
 {
     try
     {
         if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed)
         {
             UnityEngine.Transform tfroot = transform;
             if (tfroot != null)
             {
                 UnityEngine.Transform tf = tfroot.Find("RoleInfo/DragThing/Right0");
                 if (tf != null)
                 {
                     UILabel ul = tf.gameObject.GetComponent <UILabel>();
                     if (ul != null)
                     {
                         string str = "[ffffff]";
                         if (info != null)
                         {
                             str += info.AttackBase + "\n";
                             str += FormatDecimal(info.Critical * 100) + "%\n";
                             str += FormatDecimal(info.CriticalPow * 100) + "%\n";
                             str += FormatDecimal(info.CriticalBackHitPow * 100) + "%\n";
                             str += FormatDecimal(info.CriticalCrackPow * 100) + "%\n";
                             str += FormatDecimal(info.FireDamage) + "\n";
                             str += FormatDecimal(info.IceDamage) + "\n";
                             str += FormatDecimal(info.PoisonDamage) + "[-]";
                         }
                         ul.text = str;
                     }
                 }
                 tf = tfroot.Find("RoleInfo/DragThing/Right1");
                 if (tf != null)
                 {
                     UILabel ul = tf.gameObject.GetComponent <UILabel>();
                     if (ul != null)
                     {
                         string str = "[ffffff]";
                         if (info != null)
                         {
                             str += info.HpMax + "\n";
                             str += info.ADefenceBase + "\n";
                             str += info.MDefenceBase + "\n";
                             str += FormatDecimal(info.FireERD) + "\n";
                             str += FormatDecimal(info.IceERD) + "\n";
                             str += FormatDecimal(info.PoisonERD) + "[-]";
                         }
                         ul.text = str;
                     }
                 }
                 tf = tfroot.Find("RoleInfo/DragThing/Right2");
                 if (tf != null)
                 {
                     UILabel ul = tf.gameObject.GetComponent <UILabel>();
                     if (ul != null)
                     {
                         string str = "[ffffff]";
                         if (info != null)
                         {
                             str += "+" + FormatDecimal(info.MoveSpeed * 100) + "%\n";
                             str += FormatDecimal(info.HpRecover) + "/5S\n";
                             str += FormatDecimal(info.EnergyRecover) + "/5S\n";
                             str += "+" + /*info.EnergyRecover * 10*/ 0 + "%\n";
                         }
                         ul.text = str;
                     }
                 }
             }
         }
         else
         {
             ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", result.ToString(), "understand", null, null, null, false);
         }
     }
     catch (Exception ex)
     {
         ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }
Beispiel #2
0
 public void OnUnloadedSkill(int presetIndex, int slotPos, ArkCrossEngine.Network.GeneralOperationResult result)
 {
     try
     {
         if (ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed == result)
         {
             int skillId = uiSkillSetting.GetSkillId(slotPos);
             uiSkillStorage.OnUnloadedSkill(presetIndex, skillId);
             uiSkillSetting.OnUnloadedSkill(slotPos);
         }
         else
         {
             ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", result.ToString(), C_ConFirm, null, null, null, false);
         }
     }
     catch (Exception ex)
     {
         ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }
Beispiel #3
0
 public void DeleteItemInCheck(int[] item, int[] item_property_id, int[] item_num, ArkCrossEngine.Network.GeneralOperationResult result)
 {
     try
     {
         if (ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed == result)
         {
             UnityEngine.Transform tfc = null;
             for (int j = 0; j < item.Length; ++j)
             {
                 ItemConfig config = ItemConfigProvider.Instance.GetDataById(item[j]);
                 if (gridEquip != null)
                 {
                     for (int i = 0; i < gridEquip.transform.childCount; ++i)
                     {
                         tfc = gridEquip.transform.GetChild(i);
                         if (tfc != null)
                         {
                             ItemClick ic = tfc.gameObject.GetComponent <ItemClick>();
                             if (ic != null && ic.ID == item[j] && ic.PropertyId == item_property_id[j])
                             {
                                 NGUITools.DestroyImmediate(tfc.gameObject);
                                 break;
                             }
                         }
                     }
                 }
                 if (gridWingTop != null)
                 {
                     if (config != null && config.m_WearParts == 7)
                     {//翅膀
                         for (int k = 0; k < gridWingTop.transform.childCount; ++k)
                         {
                             tfc = gridWingTop.transform.GetChild(k);
                             WingItem witem = tfc.GetComponent <WingItem>();
                             if (witem != null)
                             {
                                 witem.UpdateTopView();
                             }
                         }
                     }
                 }
             }
             if (gridEquip != null)
             {
                 UIGridForDFM ug = gridEquip.gameObject.GetComponent <UIGridForDFM>();
                 if (ug != null)
                 {
                     ug.repositionNow = true;
                 }
             }
         }
         else
         {
             ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", result.ToString(), "YES", null, null, null, false);
         }
     }
     catch (Exception ex)
     {
         ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }