Ejemplo n.º 1
0
 void SetGoldBuyInfo()
 {
     ArkCrossEngine.RoleInfo ri = ArkCrossEngine.LobbyClient.Instance.CurrentRole;
     if (ri != null)
     {
         UnityEngine.Transform tf = transform.Find("bk/tip");
         if (tf != null)
         {
             UILabel ul = tf.gameObject.GetComponent <UILabel>();
             if (ul != null)
             {
                 ArkCrossEngine.VipConfig config_data = ArkCrossEngine.VipConfigProvider.Instance.GetDataById(ri.Vip);
                 ul.text = ArkCrossEngine.StrDictionaryProvider.Instance.Format(145, ri.BuyMoneyCount, null == config_data ? (ri.Vip > 0 ? ri.Vip * 10 : 10) : config_data.m_BuyGold);
             }
         }
         ArkCrossEngine.BuyMoneyConfig bmc = ArkCrossEngine.BuyMoneyConfigProvider.Instance.GetDataById(ri.BuyMoneyCount + 1);
         if (bmc != null)
         {
             tf = transform.Find("bk/money/mount");
             if (tf != null)
             {
                 UILabel ul = tf.gameObject.GetComponent <UILabel>();
                 if (ul != null)
                 {
                     ul.text = bmc.m_GainMoney.ToString();
                 }
             }
             tf = transform.Find("bk/zuan/mount");
             if (tf != null)
             {
                 UILabel ul = tf.gameObject.GetComponent <UILabel>();
                 if (ul != null)
                 {
                     ul.text = bmc.m_CostGold.ToString();
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
 void SetBuyStaminaInfo()
 {
     ArkCrossEngine.RoleInfo ri = ArkCrossEngine.LobbyClient.Instance.CurrentRole;
     if (ri != null)
     {
         UnityEngine.Transform tf = transform.Find("tip");
         if (tf != null)
         {
             UILabel ul = tf.gameObject.GetComponent <UILabel>();
             if (ul != null)
             {
                 ArkCrossEngine.VipConfig config_data = ArkCrossEngine.VipConfigProvider.Instance.GetDataById(ri.Vip);
                 ul.text = ArkCrossEngine.StrDictionaryProvider.Instance.Format(146, ri.BuyStaminaCount, null == config_data ? ri.Vip + 1 : config_data.m_Stamina);
             }
         }
         ArkCrossEngine.BuyStaminaConfig bsc = ArkCrossEngine.BuyStaminaConfigProvider.Instance.GetDataById(ri.BuyStaminaCount + 1);
         if (bsc != null)
         {
             tf = transform.Find("bk/zuan/mount");
             if (tf != null)
             {
                 UILabel ul = tf.gameObject.GetComponent <UILabel>();
                 if (ul != null)
                 {
                     ul.text = bsc.m_CostGold.ToString();
                 }
             }
             tf = transform.Find("bk/money/mount");
             if (tf != null)
             {
                 UILabel ul = tf.gameObject.GetComponent <UILabel>();
                 if (ul != null)
                 {
                     ul.text = bsc.m_GainStamina.ToString();
                 }
             }
         }
     }
 }