fix:1、UI更换(全部更换完)
This commit is contained in:
@@ -47,16 +47,15 @@ namespace LoveLegend
|
||||
GameHelper.showGameUI = true;
|
||||
HallManager.Instance.UpdateSecondEvent -= initList;
|
||||
HallManager.Instance.UpdateSecondEvent -= upWatchAdsBtn;
|
||||
HallManager.Instance.UpdateSecondEvent -= RemoveAdCountDown;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.pack_close);
|
||||
if (Isbuysuccess)
|
||||
{
|
||||
GameHelper.ShowTurnOffReward();
|
||||
}
|
||||
else
|
||||
{
|
||||
GameHelper.ShowPaidPack();
|
||||
}
|
||||
// if (Isbuysuccess)
|
||||
// {
|
||||
// GameHelper.ShowTurnOffReward();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GameHelper.ShowPaidPack();
|
||||
// }
|
||||
}
|
||||
private bool Isbuysuccess = false;
|
||||
protected override void OnBind()
|
||||
@@ -289,7 +288,6 @@ namespace LoveLegend
|
||||
private SkeletonAnimation no_ad_anims = null;
|
||||
private Action closeCallback = null;
|
||||
|
||||
private btn_get btn_remove_get = null;
|
||||
|
||||
// private void UpdatePack(int index, GObject obj)
|
||||
// {
|
||||
@@ -476,29 +474,6 @@ namespace LoveLegend
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
private void RemoveAdCountDown()
|
||||
{
|
||||
int cd = SaveData.GetSaveObject().remove_ad_time - Convert.ToInt32(GameHelper.GetNowTime());
|
||||
if (cd > 0)
|
||||
{
|
||||
if (cd > 24 * 3600)
|
||||
{
|
||||
btn_remove_get.title = CommonHelper.TimeFormat(cd, CountDownType.Day, "D");
|
||||
}
|
||||
else
|
||||
{
|
||||
btn_remove_get.title = CommonHelper.TimeFormat(cd, CountDownType.Hour);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SaveData.GetSaveObject().is_get_removead = false;
|
||||
SaveData.GetSaveObject().remove_ad_time = 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void setRemaintime(int index, GObject obj)
|
||||
{
|
||||
buygold_item item = (buygold_item)obj;
|
||||
@@ -507,38 +482,35 @@ namespace LoveLegend
|
||||
time = SaveData.GetSaveObject()._goldtime[index];
|
||||
|
||||
item.coin_text.text = GameHelper.Get101Str(list[index].Actual_coins);
|
||||
item.index.selectedIndex = index > 4 ? 4 : index;
|
||||
item.index.selectedIndex = index > 6 ? 6 : index;
|
||||
bool is_paid = list[index].is_paid;
|
||||
item.btn_buy.index.selectedIndex = 0;
|
||||
|
||||
item.off_text.text = list[index].Discount_rate + "%";
|
||||
item.discount.visible = !GameHelper.IsAdModelOfPay() && list[index].Discount_rate > 0;
|
||||
|
||||
if (list[index].Discount_rate != 0) item.off_text.text = list[index].Discount_rate + "%";
|
||||
if (time + list[index].receive_CD < GameHelper.GetNowTime())
|
||||
// item.off_text.text = list[index].Discount_rate + "%";
|
||||
// item.discount.visible = !GameHelper.IsAdModelOfPay() && list[index].Discount_rate > 0;
|
||||
//
|
||||
// if (list[index].Discount_rate != 0) item.off_text.text = list[index].Discount_rate + "%";
|
||||
|
||||
if (AdExchangeManager.Instance.GetLookRewardADNum() >= list[index].Payment_amount)
|
||||
{
|
||||
if (!is_paid)
|
||||
if (!GameHelper.IsAdModelOfPay())
|
||||
{
|
||||
item.btn_buy.btn_text.text = Language.GetContent("free");
|
||||
item.discount.visible = false;
|
||||
//支付
|
||||
decimal price = (decimal)list[index].Payment_amount2;
|
||||
item.btn_buy.btn_text.text = GameHelper.getPrice(price);
|
||||
|
||||
item.text_ads.visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!GameHelper.IsAdModelOfPay())
|
||||
{
|
||||
decimal price = (decimal)list[index].Payment_amount2;
|
||||
item.btn_buy.btn_text.text = GameHelper.getPrice(price);
|
||||
|
||||
item.text_ads.visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
double gold_price1 = list[index].Payment_amount;
|
||||
int needAds = (int)Math.Ceiling(gold_price1);
|
||||
item.text_ads.SetVar("num", needAds.ToString()).FlushVars();
|
||||
item.btn_buy.btn_text.text = needAds + " ADs";
|
||||
}
|
||||
//广告
|
||||
double gold_price1 = list[index].Payment_amount;
|
||||
int needAds = (int)Math.Ceiling(gold_price1);
|
||||
// item.text_ads.SetVar("num", needAds.ToString()).FlushVars();
|
||||
item.btn_buy.btn_text.text = needAds + " AD";
|
||||
}
|
||||
|
||||
item.btn_buy.index.selectedIndex = 1;
|
||||
|
||||
item.btn_buy.can_buy.selectedIndex = 0;
|
||||
item.btn_buy.SetClick(() =>
|
||||
{
|
||||
@@ -566,13 +538,26 @@ namespace LoveLegend
|
||||
{
|
||||
double gold_price1 = list[index].Payment_amount;
|
||||
int needAds = (int)Math.Ceiling(gold_price1);
|
||||
item.btn_buy.btn_text.text = needAds + " ADs";
|
||||
item.btn_buy.btn_text.text = needAds + " AD";
|
||||
}
|
||||
|
||||
item.btn_buy.btn_text.text = CommonHelper.TimeFormat(
|
||||
time + list[index].receive_CD - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
|
||||
item.btn_buy.SetClick(() => { });
|
||||
}
|
||||
|
||||
if (!is_paid)
|
||||
{
|
||||
if(time + list[index].receive_CD < GameHelper.GetNowTime())
|
||||
{
|
||||
item.btn_buy.btn_text.text = Language.GetContent("free");
|
||||
}
|
||||
else
|
||||
{
|
||||
item.btn_buy.can_buy.selectedIndex = 1;
|
||||
item.btn_buy.btn_text.text = CommonHelper.TimeFormat(
|
||||
time + list[index].receive_CD - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void rm_Gold(int index)
|
||||
|
||||
Reference in New Issue
Block a user