|
|
|
@@ -1,15 +1,12 @@
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using FutureCore;
|
|
|
|
|
using FairyGUI;
|
|
|
|
|
using FGUI.threeDaysGift;
|
|
|
|
|
using Spine.Unity;
|
|
|
|
|
using DG.Tweening;
|
|
|
|
|
using FGUI.P01_Common;
|
|
|
|
|
using System;
|
|
|
|
|
using SGModule.NetKit;
|
|
|
|
|
|
|
|
|
|
namespace FlowerPower
|
|
|
|
|
namespace LoveLegend
|
|
|
|
|
{
|
|
|
|
|
public class ThreeDaysGiftUI : BaseUI
|
|
|
|
|
{
|
|
|
|
@@ -44,7 +41,7 @@ namespace FlowerPower
|
|
|
|
|
HallManager.Instance.UpdateSecondEvent -= InitView;
|
|
|
|
|
GameHelper.showGameUI = true;
|
|
|
|
|
GameDispatcher.Instance.Dispatch(GameMsg.pack_close);
|
|
|
|
|
GameHelper.CallShowTurn();
|
|
|
|
|
GameHelper.CallShowTurn();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnBind()
|
|
|
|
@@ -55,9 +52,9 @@ namespace FlowerPower
|
|
|
|
|
protected override void OnOpenBefore(object args)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.three_days_gift_show, 1);
|
|
|
|
|
TrackKit.SendEvent(GameHelper.GetEventName(), ADEventTrack.Property.three_days_gift_show);
|
|
|
|
|
|
|
|
|
|
list = ConfigSystem.GetConfig<MultigiftModel>().dataList;
|
|
|
|
|
list = ConfigSystem.GetConfig<Multigift>();
|
|
|
|
|
|
|
|
|
|
ui.btn_close.SetClick(() =>
|
|
|
|
|
{
|
|
|
|
@@ -79,25 +76,10 @@ namespace FlowerPower
|
|
|
|
|
ui.groups.visible = true;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var ske_btn = FXManager.Instance.SetFx<SkeletonAnimation>(ui.ani_title, Fx_Type.fx_title_effect, ref closeCallback);
|
|
|
|
|
ske_btn.state.SetAnimation(0, "animation", true);
|
|
|
|
|
|
|
|
|
|
InitBroadCast();
|
|
|
|
|
InitView();
|
|
|
|
|
if (GameHelper.IsGiftSwitch())
|
|
|
|
|
{
|
|
|
|
|
ui.broadcast_top.visible = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ui.broadcast_top.visible = false;
|
|
|
|
|
}
|
|
|
|
|
HallManager.Instance.UpdateSecondEvent += InitView;
|
|
|
|
|
|
|
|
|
|
if (Screen.safeArea.y != 0)
|
|
|
|
|
{
|
|
|
|
|
ui.broadcast_top.y += Screen.safeArea.y;
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnOpen(object args)
|
|
|
|
@@ -128,27 +110,27 @@ namespace FlowerPower
|
|
|
|
|
void pay_success(object str)
|
|
|
|
|
{
|
|
|
|
|
string type = (string)str;
|
|
|
|
|
if (type == PurchasingManager.three_days_gift)
|
|
|
|
|
if (type == PurchasingManager.GetPaySku(PayType.three_days_gift))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
// var start = Vector2.zero;
|
|
|
|
|
// if (SaveData.GetSaveobject().three_gift_got_index == (int)rewardState.day1) {
|
|
|
|
|
// if (SaveData.GetSaveObject().three_gift_got_index == (int)rewardState.day1) {
|
|
|
|
|
// start = GameHelper.GetUICenterPosition(ui.day1.item1.lab_num);
|
|
|
|
|
// } else if (SaveData.GetSaveobject().three_gift_got_index == (int)rewardState.day2) {
|
|
|
|
|
// } else if (SaveData.GetSaveObject().three_gift_got_index == (int)rewardState.day2) {
|
|
|
|
|
// start = GameHelper.GetUICenterPosition(ui.day2.item1.lab_num);
|
|
|
|
|
// } else if (SaveData.GetSaveobject().three_gift_got_index == (int)rewardState.day3) {
|
|
|
|
|
// } else if (SaveData.GetSaveObject().three_gift_got_index == (int)rewardState.day3) {
|
|
|
|
|
// start = GameHelper.GetUICenterPosition(ui.day3.item1.lab_num);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// var rewardData = new RewardData();
|
|
|
|
|
// var end = GameHelper.GetUICenterPosition(ui.node_end);
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// var rewardSingleData = new RewardSingleData(101, list[1].coins_quantity, RewardOrigin.AdTask)
|
|
|
|
|
// {
|
|
|
|
|
// startPosition = start,
|
|
|
|
|
// endPosition = end
|
|
|
|
|
// };
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// rewardData.AddReward(rewardSingleData);
|
|
|
|
|
// rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
|
|
|
|
|
// rewardData.AddCompleted(success =>
|
|
|
|
@@ -158,12 +140,12 @@ namespace FlowerPower
|
|
|
|
|
// // RefreshGold(awardNum);
|
|
|
|
|
// // }
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
|
|
|
|
|
// // PreferencesMgr.Instance.Currency101 -= list[1].coins_quantity;
|
|
|
|
|
//
|
|
|
|
|
// // DataMgr.Coin.Value -= list[1].coins_quantity;
|
|
|
|
|
//
|
|
|
|
|
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AdcomingUI_Close);
|
|
|
|
|
// SaveData.GetSaveobject().is_get_removead = true;
|
|
|
|
|
// SaveData.GetSaveObject().is_get_removead = true;
|
|
|
|
|
// InitView();
|
|
|
|
|
|
|
|
|
|
ui.pay_type.selectedIndex = 2;
|
|
|
|
@@ -174,36 +156,35 @@ namespace FlowerPower
|
|
|
|
|
|
|
|
|
|
void rewardMul_close(object str)
|
|
|
|
|
{
|
|
|
|
|
if (SaveData.GetSaveobject().three_gift_got_index == (int)rewardState.day1)
|
|
|
|
|
if (SaveData.GetSaveObject().three_gift_got_index == (int)rewardState.day1)
|
|
|
|
|
{
|
|
|
|
|
NetworkKit.BuriedPoint(BuriedPointEvent.Three_days_gift_event, BuriedPointEvent.three_day1_success, 1);
|
|
|
|
|
TrackKit.SendEvent(ThreeDaysGiftEventTrack.Event, ThreeDaysGiftEventTrack.Property.three_day1_success);
|
|
|
|
|
}
|
|
|
|
|
else if (SaveData.GetSaveobject().three_gift_got_index == (int)rewardState.day2)
|
|
|
|
|
else if (SaveData.GetSaveObject().three_gift_got_index == (int)rewardState.day2)
|
|
|
|
|
{
|
|
|
|
|
NetworkKit.BuriedPoint(BuriedPointEvent.Three_days_gift_event, BuriedPointEvent.three_day2_success, 1);
|
|
|
|
|
TrackKit.SendEvent(ThreeDaysGiftEventTrack.Event, ThreeDaysGiftEventTrack.Property.three_day2_success);
|
|
|
|
|
}
|
|
|
|
|
else if (SaveData.GetSaveobject().three_gift_got_index == (int)rewardState.day3)
|
|
|
|
|
else if (SaveData.GetSaveObject().three_gift_got_index == (int)rewardState.day3)
|
|
|
|
|
{
|
|
|
|
|
NetworkKit.BuriedPoint(BuriedPointEvent.Three_days_gift_event, BuriedPointEvent.three_day3_success, 1);
|
|
|
|
|
TrackKit.SendEvent(ThreeDaysGiftEventTrack.Event, ThreeDaysGiftEventTrack.Property.three_day3_success);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SaveData.GetSaveobject().three_gift_got_index++;
|
|
|
|
|
SaveData.GetSaveobject().last_got_three_gift_time = GameHelper.GetNowTime();
|
|
|
|
|
SaveData.GetSaveObject().three_gift_got_index++;
|
|
|
|
|
SaveData.GetSaveObject().last_got_three_gift_time = GameHelper.GetNowTime();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private List<Multigift> list;
|
|
|
|
|
|
|
|
|
|
// int adNums = AdRdManager.Instance.GetLookRewardADNum();
|
|
|
|
|
// int adNums = AdExchangeManager.Instance.GetLookRewardADNum();
|
|
|
|
|
// adNums++;
|
|
|
|
|
// AdRdManager.Instance.SetLookRewardADNum(adNums);
|
|
|
|
|
// AdExchangeManager.Instance.SetLookRewardADNum(adNums);
|
|
|
|
|
private void InitView()
|
|
|
|
|
{
|
|
|
|
|
ui.text_have.text = "Owner ADs:" + AdRdManager.Instance.GetLookRewardADNum();
|
|
|
|
|
ui.need_text.text = "need " + list[0].Paid_price + " ADs";
|
|
|
|
|
ui.text_have.text = Language.GetContentParams("owner_ad", AdExchangeManager.Instance.GetLookRewardADNum());
|
|
|
|
|
ui.need_text.text = Language.GetContentParams("need_ad", list[0].Paid_price);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ui.btn_buypack.GetChild("img_saveingpot").visible = false;
|
|
|
|
|
ui.btn_max_pack.GetChild("img_saveingpot").visible = false;
|
|
|
|
|
|
|
|
|
|
initItem(0);
|
|
|
|
|
initItem(1);
|
|
|
|
@@ -212,11 +193,11 @@ namespace FlowerPower
|
|
|
|
|
FGUI.threeDaysGift.btn_watchAd btn_buypack = (ui.btn_buypack as FGUI.threeDaysGift.btn_watchAd);
|
|
|
|
|
GObject pack_title = ui.btn_buypack.GetChild("btn_text");
|
|
|
|
|
|
|
|
|
|
if (SaveData.GetSaveobject().is_get_ThreeDaysGift)
|
|
|
|
|
if (SaveData.GetSaveObject().is_get_ThreeDaysGift)
|
|
|
|
|
{
|
|
|
|
|
ui.pay_type.selectedIndex = 2;
|
|
|
|
|
var isToday = GameHelper.InToday(SaveData.GetSaveobject().last_got_three_gift_time, 0, true);
|
|
|
|
|
int three_gift_got_index = SaveData.GetSaveobject().three_gift_got_index;
|
|
|
|
|
var isToday = GameHelper.InToday(SaveData.GetSaveObject().last_got_three_gift_time, 0, true);
|
|
|
|
|
int three_gift_got_index = SaveData.GetSaveObject().three_gift_got_index;
|
|
|
|
|
if (isToday || (three_gift_got_index > (int)rewardState.day3))
|
|
|
|
|
{
|
|
|
|
|
ui.btn_get.grayed = true;
|
|
|
|
@@ -224,7 +205,7 @@ namespace FlowerPower
|
|
|
|
|
{
|
|
|
|
|
if (three_gift_got_index < (int)rewardState.day3)
|
|
|
|
|
{
|
|
|
|
|
GameHelper.ShowTips("Come back and pick it up tomorrow.");
|
|
|
|
|
GameHelper.ShowTips("pick_tomorrow",true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@@ -244,8 +225,8 @@ namespace FlowerPower
|
|
|
|
|
{
|
|
|
|
|
ui.pay_type.selectedIndex = 1;
|
|
|
|
|
decimal price_pack = (decimal)list[0].Paid_price2;
|
|
|
|
|
ui.btn_max_pack.title = GameHelper.getPrice(price_pack);
|
|
|
|
|
bool is_get = SaveData.GetSaveobject().is_get_ThreeDaysGift;
|
|
|
|
|
ui.btn_max_pack.title = GameHelper.Get102Str(price_pack);
|
|
|
|
|
bool is_get = SaveData.GetSaveObject().is_get_ThreeDaysGift;
|
|
|
|
|
if (is_get)
|
|
|
|
|
{
|
|
|
|
|
ui.btn_max_pack.enabled = false;
|
|
|
|
@@ -253,16 +234,13 @@ namespace FlowerPower
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
|
|
|
|
|
{
|
|
|
|
|
ui.btn_max_pack.GetChild("img_saveingpot").visible = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ui.btn_max_pack.SetClick(() =>
|
|
|
|
|
{
|
|
|
|
|
ApplePayClass maxPayData = new ApplePayClass
|
|
|
|
|
{
|
|
|
|
|
amount = (int)Math.Round(price_pack * 100),
|
|
|
|
|
sku = PurchasingManager.three_days_gift,
|
|
|
|
|
sku =PurchasingManager.GetPaySku(PayType.three_days_gift),
|
|
|
|
|
currency = "USD"
|
|
|
|
|
};
|
|
|
|
|
MaxPayManager.Instance.Buy(maxPayData);
|
|
|
|
@@ -275,51 +253,48 @@ namespace FlowerPower
|
|
|
|
|
{
|
|
|
|
|
ui.pay_type.selectedIndex = 0;
|
|
|
|
|
|
|
|
|
|
bool is_get = SaveData.GetSaveobject().is_get_ThreeDaysGift;
|
|
|
|
|
bool is_get = SaveData.GetSaveObject().is_get_ThreeDaysGift;
|
|
|
|
|
if (is_get)
|
|
|
|
|
{
|
|
|
|
|
btn_buypack.buy_state.selectedIndex = 0;
|
|
|
|
|
btn_buypack.can_buy.selectedIndex = 1;
|
|
|
|
|
ui.btn_buypack.grayed = true;
|
|
|
|
|
pack_title.text = "Cliamed";
|
|
|
|
|
pack_title.text = Language.GetContent("claimed");
|
|
|
|
|
ui.btn_buypack.SetClick(() =>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else if (AdRdManager.Instance.GetLookRewardADNum() >= list[0].Paid_price)
|
|
|
|
|
else if (AdExchangeManager.Instance.GetLookRewardADNum() >= list[0].Paid_price)
|
|
|
|
|
{
|
|
|
|
|
btn_buypack.buy_state.selectedIndex = 1;
|
|
|
|
|
btn_buypack.can_buy.selectedIndex = 0;
|
|
|
|
|
btn_buypack.SetClick(() =>
|
|
|
|
|
{
|
|
|
|
|
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_AD_event, BuriedPointEvent.three_days_gift_buy_success, 1);
|
|
|
|
|
// SaveData.GetSaveobject().look_ad_numbers
|
|
|
|
|
int adNums = AdRdManager.Instance.GetLookRewardADNum();
|
|
|
|
|
TrackKit.SendEvent(GameHelper.GetEventName(), ADEventTrack.Property.three_days_gift_buy_success);
|
|
|
|
|
// SaveData.GetSaveObject().look_ad_numbers
|
|
|
|
|
int adNums = AdExchangeManager.Instance.GetLookRewardADNum();
|
|
|
|
|
adNums -= (int)list[0].Paid_price;
|
|
|
|
|
AdRdManager.Instance.SetLookRewardADNum(adNums);
|
|
|
|
|
GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, PurchasingManager.three_days_gift);
|
|
|
|
|
AdExchangeManager.Instance.SetLookRewardADNum(adNums);
|
|
|
|
|
GameDispatcher.Instance.Dispatch(GameMsg.apple_pay_success, PurchasingManager.GetPaySku(PayType.three_days_gift));
|
|
|
|
|
|
|
|
|
|
// getReward();
|
|
|
|
|
ui.btn_buypack.SetClick(() => { });
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else if (SaveData.GetSaveobject()._watch_ad_cd > GameHelper.GetNowTime())
|
|
|
|
|
else if (SaveData.GetSaveObject()._watch_ad_cd > GameHelper.GetNowTime())
|
|
|
|
|
{
|
|
|
|
|
btn_buypack.buy_state.selectedIndex = 0;
|
|
|
|
|
btn_buypack.can_buy.selectedIndex = 1;
|
|
|
|
|
pack_title.text = CommonHelper.TimeFormat(SaveData.GetSaveobject()._watch_ad_cd - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
|
|
|
|
pack_title.text = CommonHelper.TimeFormat(SaveData.GetSaveObject()._watch_ad_cd - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
|
|
|
|
btn_buypack.SetClick(() => { });
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
btn_buypack.buy_state.selectedIndex = 0;
|
|
|
|
|
btn_buypack.can_buy.selectedIndex = 0;
|
|
|
|
|
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
|
|
|
|
|
{
|
|
|
|
|
ui.btn_buypack.GetChild("img_saveingpot").visible = true;
|
|
|
|
|
}
|
|
|
|
|
pack_title.text = "Watch AD";
|
|
|
|
|
|
|
|
|
|
pack_title.text = Language.GetContent("watch_ad");
|
|
|
|
|
btn_buypack.SetClick(() =>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
@@ -327,17 +302,15 @@ namespace FlowerPower
|
|
|
|
|
{
|
|
|
|
|
if (issuccess)
|
|
|
|
|
{
|
|
|
|
|
SaveData.GetSaveobject()._watch_ad_cd = (int)GameHelper.GetNowTime() + GameHelper.GetCommonModel().exchangeCD;
|
|
|
|
|
SaveData.GetSaveObject()._watch_ad_cd = (int)GameHelper.GetNowTime() + GameHelper.GetCommonModel().exchangeCD;
|
|
|
|
|
InitView();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_AD_event, BuriedPointEvent.three_days_gift_click, 1);
|
|
|
|
|
TrackKit.SendEvent(GameHelper.GetEventName(), ADEventTrack.Property.three_days_gift_click);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BroadCast();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void initItem(int index)
|
|
|
|
@@ -356,16 +329,28 @@ namespace FlowerPower
|
|
|
|
|
day = ui.day3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (SaveData.GetSaveobject().three_gift_got_index - 1 > index)
|
|
|
|
|
if (SaveData.GetSaveObject().three_gift_got_index - 1 > index)
|
|
|
|
|
{
|
|
|
|
|
day.img_select.visible = true;
|
|
|
|
|
if (SaveData.GetSaveobject().three_gift_got_index - 1 > 2)
|
|
|
|
|
if (SaveData.GetSaveObject().three_gift_got_index - 1 > 2)
|
|
|
|
|
{
|
|
|
|
|
day.img_select2.visible = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (index == 2)
|
|
|
|
|
{
|
|
|
|
|
day.state.selectedIndex = 3;
|
|
|
|
|
for (int i = 0; i < 3; i++)
|
|
|
|
|
{
|
|
|
|
|
item_reward item = day.GetChild("item" + (i + 2)) as item_reward;
|
|
|
|
|
item.visible = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
day.state.selectedIndex = list[index].props_quantity.Length;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
day.state.selectedIndex = list[index].props_quantity.Length;
|
|
|
|
|
|
|
|
|
|
setItemUrl(day.item1.loader_, GiftType.coin);
|
|
|
|
|
day.item1.lab_num.text = "x" + list[index].coins_quantity;
|
|
|
|
@@ -374,7 +359,7 @@ namespace FlowerPower
|
|
|
|
|
{
|
|
|
|
|
item_reward item = (day.GetChild("item" + (i + 2)) as item_reward);
|
|
|
|
|
setItemUrl(item.loader_, (GiftType)list[index].props_type[i]);
|
|
|
|
|
|
|
|
|
|
item.visible = true;
|
|
|
|
|
item.lab_num.text = "x" + list[index].props_quantity[i];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -389,7 +374,7 @@ namespace FlowerPower
|
|
|
|
|
|
|
|
|
|
private void getReward()
|
|
|
|
|
{
|
|
|
|
|
int index = SaveData.GetSaveobject().three_gift_got_index;
|
|
|
|
|
int index = SaveData.GetSaveObject().three_gift_got_index;
|
|
|
|
|
|
|
|
|
|
com_item item = null;
|
|
|
|
|
if (index == (int)rewardState.day1)
|
|
|
|
@@ -421,69 +406,6 @@ namespace FlowerPower
|
|
|
|
|
data.reward = rewards;
|
|
|
|
|
uiCtrlDispatcher.Dispatch(UICtrlMsg.RewardMulNewUI_Open, data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private int broadtime = 0;
|
|
|
|
|
private List<string> config_name_list = ConfigSystem.GetConfig<LevelAttemptsModel>().config_name_list;
|
|
|
|
|
private List<string> config_money_list = ConfigSystem.GetConfig<LevelAttemptsModel>().config_money_list;
|
|
|
|
|
private List<string[]> broad_list = new List<string[]>();
|
|
|
|
|
private List<GTextField> text_list = new List<GTextField>();
|
|
|
|
|
private void InitBroadCast()
|
|
|
|
|
{
|
|
|
|
|
text_list.Add((ui.broadcast_top as broadcast_top).item_0.text_1);
|
|
|
|
|
text_list.Add((ui.broadcast_top as broadcast_top).item_1.text_1);
|
|
|
|
|
text_list.Add((ui.broadcast_top as broadcast_top).item_2.text_1);
|
|
|
|
|
for (int i = 0; i < 3; i++)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
|
|
|
|
|
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
|
|
|
|
|
broad_list.Add(new string[2] { config_name_list[name_index], config_money_list[money_index] });
|
|
|
|
|
text_list[i].text = "Congratulations,User [color=#ffda68][size=36]" + broad_list[i][0] + "[/size][/color] !After purchasing the ThreeDays Bouns,play [color=#ffda68]" + broad_list[i][1] + "[/color] matcher to clear the stage!";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BroadCast()
|
|
|
|
|
{
|
|
|
|
|
broadtime++;
|
|
|
|
|
if (broadtime % 13 == 1)
|
|
|
|
|
{
|
|
|
|
|
(ui.broadcast_top as broadcast_top).t1.Play(() =>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
|
|
|
|
|
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
|
|
|
|
|
string[] array_ = new string[2] { config_name_list[name_index], config_money_list[money_index] };
|
|
|
|
|
text_list[0].text = "Congratulations,User [color=#ffda68][size=36]" + array_[0] +
|
|
|
|
|
"[/size][/color] !After purchasing the ThreeDays Bouns,play [color=#ffda68]" + array_[1] + "[/color] matcher to clear the stage!";
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else if (broadtime % 13 == 4)
|
|
|
|
|
{
|
|
|
|
|
(ui.broadcast_top as broadcast_top).t2.Play(() =>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
|
|
|
|
|
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
|
|
|
|
|
string[] array_ = new string[2] { config_name_list[name_index], config_money_list[money_index] };
|
|
|
|
|
text_list[1].text = "Congratulations,User [color=#ffda68][size=36]" + array_[0] +
|
|
|
|
|
"[/size][/color] !After purchasing the ThreeDays Bouns,play [color=#ffda68]" + array_[1] + "[/color] matcher to clear the stage!";
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if (broadtime % 13 == 7)
|
|
|
|
|
{
|
|
|
|
|
(ui.broadcast_top as broadcast_top).t3.Play(() =>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
|
|
|
|
|
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
|
|
|
|
|
string[] array_ = new string[2] { config_name_list[name_index], config_money_list[money_index] };
|
|
|
|
|
text_list[2].text = "Congratulations,User [color=#ffda68][size=36]" + array_[0] +
|
|
|
|
|
"[/size][/color] !After purchasing the ThreeDays Bouns,play [color=#ffda68]" + array_[1] + "[/color] matcher to clear the stage!";
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
enum rewardState
|
|
|
|
@@ -505,4 +427,4 @@ public enum GiftType : int
|
|
|
|
|
move_out = 0,
|
|
|
|
|
undo = 1,
|
|
|
|
|
refresh = 2,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|