bingo b面修改
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3fb40ee181b6943beb2c958735eab6bd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,48 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class AdcomingCtrl : BaseCtrl
|
||||
{
|
||||
public static AdcomingCtrl Instance { get; private set; }
|
||||
|
||||
private AdcomingModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.AdcomingModel) as AdcomingModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8bd042de9ef64e59b65fefb9788f71d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,48 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class AdcomingModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 读取数据
|
||||
protected override void OnReadData()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 本地存储
|
||||
protected override void WriteLocalStorage()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29789969ee11944f8be5196fc0b81532
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,108 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using FairyGUI;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
using FGUI.G008_reward_animal;
|
||||
using DG.Tweening;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class AdcomingUI : BaseUI
|
||||
{
|
||||
private AdcomingUICtrl ctrl;
|
||||
private AdcomingModel model;
|
||||
private FGUI.G008_reward_animal.com_adcoming ui;
|
||||
|
||||
public AdcomingUI(AdcomingUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.AdcomingUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "G008_reward_animal";
|
||||
uiInfo.assetName = "com_adcoming";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.AdcomingModel) as AdcomingModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.G008_reward_animal.com_adcoming;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
InitView();
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
GameDispatcher.Instance.AddListener(GameMsg.pack_close, playAni);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.pack_close, playAni);
|
||||
}
|
||||
#endregion
|
||||
private int time = 5;
|
||||
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
ui.time_text.text = time.ToString();
|
||||
|
||||
tweer = DOVirtual.Float(time, 0, time, value => { ui.time_text.text = ((int)value).ToString(); });
|
||||
tweer.onComplete += () =>
|
||||
{
|
||||
CtrlCloseUI();
|
||||
GameHelper.ShowInterstitial("interstitial_gameend");
|
||||
};
|
||||
ui.btn_removead.SetClick(() =>
|
||||
{
|
||||
PackRewardData param = new PackRewardData();
|
||||
param.isAutoPop = false;
|
||||
param.isNeedScroll = true;
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open, param);
|
||||
tweer.Pause();
|
||||
});
|
||||
|
||||
}
|
||||
private Tween tweer;
|
||||
void playAni(object a)
|
||||
{
|
||||
tweer.Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfe9a378b6c07410b91e71ce80c75a05
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class AdcomingUICtrl : BaseUICtrl
|
||||
{
|
||||
private AdcomingUI ui;
|
||||
private AdcomingModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.AdcomingUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.AdcomingUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.AdcomingModel) as AdcomingModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new AdcomingUI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.Close();
|
||||
}
|
||||
ui = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
public override uint GetOpenUIMsg(string uiName)
|
||||
{
|
||||
return openUIMsg;
|
||||
}
|
||||
public override uint GetCloseUIMsg(string uiName)
|
||||
{
|
||||
return closeUIMsg;
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbf393f35eff5477da2f9c69a02c3822
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -166,7 +166,7 @@ namespace BingoBrain
|
||||
|
||||
GameHelper.GetVideo("reward_extraFlip", isSuccess =>
|
||||
{
|
||||
// if (isSuccess)
|
||||
if (isSuccess)
|
||||
{
|
||||
var adwardModel = GameHelper.GetConfig<AdRewardModel>();
|
||||
MaxClickNum = Mathf.Clamp(MaxClickNum + adwardModel.GetData("reward_extraFlip").rewardAmount,
|
||||
|
||||
@@ -50,20 +50,20 @@ namespace BingoBrain
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
FX.Instance.GetFx<SkeletonAnimation>(Fx_Type.spine_reward, sk =>
|
||||
{
|
||||
var skeletal = sk;
|
||||
var goWrapper = new GoWrapper(skeletal.gameObject);
|
||||
ui.com_endPop.gp_fx.SetNativeObject(goWrapper);
|
||||
skeletal.transform.localScale = Vector3.one * 110;
|
||||
skeletal.state.SetAnimation(0, "animation", true);
|
||||
closeCb += () =>
|
||||
{
|
||||
goWrapper.wrapTarget = null;
|
||||
ui.com_endPop.gp_fx.SetNativeObject(null);
|
||||
FX.Instance.RecFx(Fx_Type.spine_reward, skeletal);
|
||||
};
|
||||
});
|
||||
// FX.Instance.GetFx<SkeletonAnimation>(Fx_Type.spine_reward, sk =>
|
||||
// {
|
||||
// var skeletal = sk;
|
||||
// var goWrapper = new GoWrapper(skeletal.gameObject);
|
||||
// ui.com_endPop.gp_fx.SetNativeObject(goWrapper);
|
||||
// skeletal.transform.localScale = Vector3.one * 110;
|
||||
// skeletal.state.SetAnimation(0, "animation", true);
|
||||
// closeCb += () =>
|
||||
// {
|
||||
// goWrapper.wrapTarget = null;
|
||||
// ui.com_endPop.gp_fx.SetNativeObject(null);
|
||||
// FX.Instance.RecFx(Fx_Type.spine_reward, skeletal);
|
||||
// };
|
||||
// });
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
|
||||
@@ -67,15 +67,15 @@ namespace BingoBrain
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
InitView();
|
||||
if (!GameHelper.IsGiftSwitch() && (ConfigSystem.GetConfig<CommonModel>().WVswitch == 1))
|
||||
{
|
||||
ui.btn_h5.visible = true;
|
||||
ui.btn_h5.GetChild("number_text").visible=false;
|
||||
}
|
||||
ui.btn_h5.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.H5UI_Open);
|
||||
});
|
||||
// if (!GameHelper.IsGiftSwitch() && (ConfigSystem.GetConfig<CommonModel>().WVswitch == 1))
|
||||
// {
|
||||
// ui.btn_h5.visible = true;
|
||||
// ui.btn_h5.GetChild("number_text").visible=false;
|
||||
// }
|
||||
// ui.btn_h5.SetClick(() =>
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(SkinInfo.H5UI_Open);
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
@@ -109,7 +109,8 @@ namespace BingoBrain
|
||||
{
|
||||
ui.gift.selectedIndex = 1;
|
||||
(ui.btn_ballon as btn_balloon).gift.selectedIndex = 1;
|
||||
};
|
||||
}
|
||||
;
|
||||
#if !UNITY_EDITOR
|
||||
ui.btn_admin.visible=false;
|
||||
#endif
|
||||
@@ -132,7 +133,7 @@ namespace BingoBrain
|
||||
OnCardNumChange(null);
|
||||
ui.com_cardnum.cont_state.selectedIndex = model.CardBoardCountIndex;
|
||||
ui.com_cardplay.cont_text.selectedIndex = model.CardBoardCountIndex;
|
||||
|
||||
ui.type.selectedIndex = model.CardBoardCountIndex;
|
||||
ui.btn_ballon.visible = !IsBallonCD;
|
||||
ui.btn_ballon.SetClick(OnClickBalloon);
|
||||
ui.btn_ballon.sortingOrder = 100;
|
||||
@@ -152,16 +153,16 @@ namespace BingoBrain
|
||||
SetMakeup();
|
||||
ui.btn_admin.SetClick(() =>
|
||||
{
|
||||
MakeupTaskData makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory.Last();
|
||||
makeupTaskData.videoCount = 999999;
|
||||
PreferencesMgr.Instance.MakeupTaskH5Time = 99999;
|
||||
PreferencesMgr.Instance.Currency102 = 99999;
|
||||
PreferencesMgr.Instance.Currency101 = 99999999;
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.RefreshMakeupData);
|
||||
// MakeupTaskData makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory.Last();
|
||||
// makeupTaskData.videoCount = 999999;
|
||||
// PreferencesMgr.Instance.MakeupTaskH5Time = 99999;
|
||||
// PreferencesMgr.Instance.Currency102 = 99999;
|
||||
// PreferencesMgr.Instance.Currency101 = 99999999;
|
||||
// GameDispatcher.Instance.Dispatch(BingoInfo.RefreshMakeupData);
|
||||
|
||||
makeupTaskData = PreferencesMgr.Instance.CoinMakeupTaskHistory.Last();
|
||||
makeupTaskData.videoCount = 99999;
|
||||
PreferencesMgr.Instance.CoinMakeupTaskH5Time = 99999;
|
||||
// makeupTaskData = PreferencesMgr.Instance.CoinMakeupTaskHistory.Last();
|
||||
// makeupTaskData.videoCount = 99999;
|
||||
// PreferencesMgr.Instance.CoinMakeupTaskH5Time = 99999;
|
||||
|
||||
});
|
||||
ui.btn_set.SetClick(() =>
|
||||
@@ -172,7 +173,22 @@ namespace BingoBrain
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.FaqUIUI_Open);
|
||||
});
|
||||
|
||||
ui.btn_cashout.SetClick(() =>
|
||||
{
|
||||
var makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory.Last();
|
||||
var vo = ConfigSystem.GetConfig<MakeupModel>().GetData(makeupTaskData.tableId);
|
||||
//DataMgr.Ticket.Value=99999;
|
||||
//makeupTaskData.videoCount = 50;
|
||||
if (vo == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
});
|
||||
ui.btn_saveingpot.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.SaveingPotUI_Open);
|
||||
});
|
||||
}
|
||||
|
||||
private void UpdateNextCardBoardTime()
|
||||
@@ -304,13 +320,15 @@ namespace BingoBrain
|
||||
model.CardBoardCountIndex--;
|
||||
ui.com_cardnum.cont_state.selectedIndex = model.CardBoardCountIndex;
|
||||
ui.com_cardplay.cont_text.selectedIndex = model.CardBoardCountIndex;
|
||||
var animName = model.CardBoardCountIndex switch
|
||||
{
|
||||
0 => "2_1",
|
||||
1 => "4_2",
|
||||
_ => ""
|
||||
};
|
||||
NAAVsa.PlayAnim(cardSpine, animName);
|
||||
Debug.Log(model.CardBoardCountIndex);
|
||||
ui.type.selectedIndex = model.CardBoardCountIndex;
|
||||
// var animName = model.CardBoardCountIndex switch
|
||||
// {
|
||||
// 0 => "2_1",
|
||||
// 1 => "4_2",
|
||||
// _ => ""
|
||||
// };
|
||||
// NAAVsa.PlayAnim(cardSpine, animName);
|
||||
}
|
||||
|
||||
private void OnBtnAddClick()
|
||||
@@ -318,15 +336,15 @@ namespace BingoBrain
|
||||
model.CardBoardCountIndex++;
|
||||
ui.com_cardnum.cont_state.selectedIndex = model.CardBoardCountIndex;
|
||||
ui.com_cardplay.cont_text.selectedIndex = model.CardBoardCountIndex;
|
||||
ui.type.selectedIndex = model.CardBoardCountIndex;
|
||||
// var animName = model.CardBoardCountIndex switch
|
||||
// {
|
||||
// 1 => "1_2",
|
||||
// 2 => "2_4",
|
||||
// _ => ""
|
||||
// };
|
||||
|
||||
var animName = model.CardBoardCountIndex switch
|
||||
{
|
||||
1 => "1_2",
|
||||
2 => "2_4",
|
||||
_ => ""
|
||||
};
|
||||
|
||||
NAAVsa.PlayAnim(cardSpine, animName);
|
||||
// NAAVsa.PlayAnim(cardSpine, animName);
|
||||
}
|
||||
|
||||
private void OnCardNumChange(EventContext context)
|
||||
@@ -363,26 +381,26 @@ namespace BingoBrain
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
FX.Instance.SetFx<SkeletonAnimation>(ui.gp_fx, Fx_Type.spine_choice_card_b, sk =>
|
||||
{
|
||||
cardSpine = sk;
|
||||
// if (GameHelper.IsGiftSwitch())
|
||||
// {
|
||||
// FX.Instance.SetFx<SkeletonAnimation>(ui.gp_fx, Fx_Type.spine_choice_card_b, sk =>
|
||||
// {
|
||||
// cardSpine = sk;
|
||||
|
||||
NAAVsa.AddCompleteEvent(cardSpine, OnChangeCardFinish);
|
||||
OnChangeCardFinish(null);
|
||||
}, CloseCb);
|
||||
}
|
||||
else
|
||||
{
|
||||
FX.Instance.SetFx<SkeletonAnimation>(ui.gp_fx, Fx_Type.spine_choice_card, sk =>
|
||||
{
|
||||
cardSpine = sk;
|
||||
// NAAVsa.AddCompleteEvent(cardSpine, OnChangeCardFinish);
|
||||
// OnChangeCardFinish(null);
|
||||
// }, CloseCb);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// FX.Instance.SetFx<SkeletonAnimation>(ui.gp_fx, Fx_Type.spine_choice_card, sk =>
|
||||
// {
|
||||
// cardSpine = sk;
|
||||
|
||||
NAAVsa.AddCompleteEvent(cardSpine, OnChangeCardFinish);
|
||||
OnChangeCardFinish(null);
|
||||
}, CloseCb);
|
||||
}
|
||||
// NAAVsa.AddCompleteEvent(cardSpine, OnChangeCardFinish);
|
||||
// OnChangeCardFinish(null);
|
||||
// }, CloseCb);
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@@ -444,7 +462,7 @@ namespace BingoBrain
|
||||
}
|
||||
void SetMakeup(object a = null)
|
||||
{
|
||||
if(!GameHelper.IsGiftSwitch()) return;
|
||||
return;
|
||||
// var com_box = ui.com_box;
|
||||
// com_box.cont_white.selectedIndex =
|
||||
// GameHelper.IsGiftSwitch() ? com_box._White_none : com_box._White_white;
|
||||
@@ -469,19 +487,19 @@ namespace BingoBrain
|
||||
{
|
||||
|
||||
|
||||
var makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory.Last();
|
||||
Debug.Log(PreferencesMgr.Instance.MakeupTaskHistory.Count);
|
||||
Debug.Log(JsonConvert.SerializeObject(makeupTaskData));
|
||||
Debug.Log(ConfigSystem.GetConfig<MakeupModel>().GetCount());
|
||||
Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig<MakeupModel>()));
|
||||
// var makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory.Last();
|
||||
// Debug.Log(PreferencesMgr.Instance.MakeupTaskHistory.Count);
|
||||
// Debug.Log(JsonConvert.SerializeObject(makeupTaskData));
|
||||
// Debug.Log(ConfigSystem.GetConfig<MakeupModel>().GetCount());
|
||||
// Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig<MakeupModel>()));
|
||||
|
||||
makeup vo = null;
|
||||
|
||||
foreach (makeup item in ConfigSystem.GetConfig<MakeupModel>().dataList)
|
||||
{
|
||||
Debug.Log(JsonConvert.SerializeObject(item));
|
||||
if (item.id == makeupTaskData.tableId) vo = item;
|
||||
}
|
||||
// foreach (makeup item in ConfigSystem.GetConfig<MakeupModel>().dataList)
|
||||
// {
|
||||
// Debug.Log(JsonConvert.SerializeObject(item));
|
||||
// if (item.id == makeupTaskData.tableId) vo = item;
|
||||
// }
|
||||
// Debug.Log(ConfigSystem.GetConfig<MakeupModel>().GetData(0));
|
||||
// Debug.Log(ConfigSystem.GetConfig<MakeupModel>().GetData(1));
|
||||
// Debug.Log(ConfigSystem.GetConfig<MakeupModel>().GetData(2));
|
||||
@@ -501,60 +519,60 @@ namespace BingoBrain
|
||||
// pbTxt.text =
|
||||
// $"{GameHelper.Get101Str((decimal)(vo.item_need - leftCash))}/{GameHelper.Get101Str((decimal)com_box.pb_num.max)}";
|
||||
|
||||
ui.makeup.btn_cash.SetClick(() =>
|
||||
{
|
||||
Debug.Log("999999999999999");
|
||||
// if (GameHelper.CanGuide() && !GuideCtrl.Instance.IsFinishGuide(1))
|
||||
// {
|
||||
// GuideCtrl.Instance.Dispatch("ClickButton");
|
||||
// ui.com_box.finger_place.visible = false;
|
||||
// }
|
||||
// ui.makeup.btn_cash.SetClick(() =>
|
||||
// {
|
||||
// Debug.Log("999999999999999");
|
||||
// // if (GameHelper.CanGuide() && !GuideCtrl.Instance.IsFinishGuide(1))
|
||||
// // {
|
||||
// // GuideCtrl.Instance.Dispatch("ClickButton");
|
||||
// // ui.com_box.finger_place.visible = false;
|
||||
// // }
|
||||
|
||||
uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
});
|
||||
// uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
// });
|
||||
}
|
||||
|
||||
{
|
||||
if (PreferencesMgr.Instance.CoinMakeupTaskHistory.Count == 0)
|
||||
{
|
||||
// if (PreferencesMgr.Instance.CoinMakeupTaskHistory.Count == 0)
|
||||
// {
|
||||
|
||||
BingoDataSystem.CheckCoinMakeupTaskData();
|
||||
//PreferencesMgr.Instance.MakeupTaskHistory.Add(new MakeupTaskData());
|
||||
//Debug.Log(PreferencesMgr.Instance.MakeupTaskHistory.Count);
|
||||
}
|
||||
// BingoDataSystem.CheckCoinMakeupTaskData();
|
||||
// //PreferencesMgr.Instance.MakeupTaskHistory.Add(new MakeupTaskData());
|
||||
// //Debug.Log(PreferencesMgr.Instance.MakeupTaskHistory.Count);
|
||||
// }
|
||||
|
||||
var makeupTaskData = PreferencesMgr.Instance.CoinMakeupTaskHistory.Last();
|
||||
var vo = ConfigSystem.GetConfig<CardRedeemNewModel>().dataList
|
||||
.FirstOrDefault(cardNew => cardNew.id == makeupTaskData.tableId);
|
||||
Debug.Log(JsonConvert.SerializeObject(vo));
|
||||
DOVirtual.Float(0, PreferencesMgr.Instance.Currency101, 1,
|
||||
value => { ui.makeup.gold_text.text = ((int)value).ToString(); });
|
||||
ui.makeup.gold_progress_text.text = PreferencesMgr.Instance.Currency101 + "/" + vo.item_need;
|
||||
ui.makeup.gold_progress.value = ((float)PreferencesMgr.Instance.Currency101 * 100) / vo.item_need;
|
||||
Debug.Log(((float)PreferencesMgr.Instance.Currency101) / vo.item_need);
|
||||
ui.makeup.coin_cash.text = "$" + vo.redeem_num;
|
||||
ui.makeup.btn_goldout.SetClick(() =>
|
||||
{
|
||||
Debug.Log(PreferencesMgr.Instance.Currency101);
|
||||
Debug.Log(vo.item_need);
|
||||
if (makeupTaskData.status == MakeupTaskStatus.None)
|
||||
{
|
||||
if (PreferencesMgr.Instance.Currency101 >= vo.item_need)
|
||||
{
|
||||
uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameHelper.ShowTips("Not enough", true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
}
|
||||
});
|
||||
// var makeupTaskData = PreferencesMgr.Instance.CoinMakeupTaskHistory.Last();
|
||||
// var vo = ConfigSystem.GetConfig<CardRedeemNewModel>().dataList
|
||||
// .FirstOrDefault(cardNew => cardNew.id == makeupTaskData.tableId);
|
||||
// Debug.Log(JsonConvert.SerializeObject(vo));
|
||||
// DOVirtual.Float(0, PreferencesMgr.Instance.Currency101, 1,
|
||||
// value => { ui.makeup.gold_text.text = ((int)value).ToString(); });
|
||||
// ui.makeup.gold_progress_text.text = PreferencesMgr.Instance.Currency101 + "/" + vo.item_need;
|
||||
// ui.makeup.gold_progress.value = ((float)PreferencesMgr.Instance.Currency101 * 100) / vo.item_need;
|
||||
// Debug.Log(((float)PreferencesMgr.Instance.Currency101) / vo.item_need);
|
||||
// ui.makeup.coin_cash.text = "$" + vo.redeem_num;
|
||||
// ui.makeup.btn_goldout.SetClick(() =>
|
||||
// {
|
||||
// Debug.Log(PreferencesMgr.Instance.Currency101);
|
||||
// Debug.Log(vo.item_need);
|
||||
// if (makeupTaskData.status == MakeupTaskStatus.None)
|
||||
// {
|
||||
// if (PreferencesMgr.Instance.Currency101 >= vo.item_need)
|
||||
// {
|
||||
// uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GameHelper.ShowTips("Not enough", true);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
(ui.btn_ballon as btn_balloon).cash_text.text = GameHelper.GetDynamicReward(102, GameHelper.GetCommonModel().ballonReward102).ToString("0.00");
|
||||
(ui.btn_ballon as btn_balloon).cash_text.text = GameHelper.GetDynamicReward(102, GameHelper.GetCommonModel().ballonReward102).ToString("0.00");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,13 +71,13 @@ namespace BingoBrain
|
||||
protected override void AddListener()
|
||||
{
|
||||
//Hall.Instance.AddChangeGiftSwitch(InitView);
|
||||
//GameDispatcher.Instance.AddListener(BingoInfo.MainTab, OnGameTab);
|
||||
GameDispatcher.Instance.AddListener(BingoInfo.MainTab, OnGameTab);
|
||||
}
|
||||
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
//Hall.Instance.RemoveChangeGiftSwitch(InitView);
|
||||
// GameDispatcher.Instance.RemoveListener(BingoInfo.MainTab, OnGameTab);
|
||||
GameDispatcher.Instance.RemoveListener(BingoInfo.MainTab, OnGameTab);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -91,13 +91,13 @@ namespace BingoBrain
|
||||
ui.com_di.btn_main.SetClickDownEffect(0.8f, 1);
|
||||
ui.com_di.btn_tab_redem.SetClickDownEffect(0.8f, 1);
|
||||
ui.com_di.btn_hall.SetClickDownEffect(0.8f, 1);
|
||||
ui.com_di.btn_h5.SetClickDownEffect(0.8f, 1);
|
||||
|
||||
ui.com_di.btn_h5.SetClick(OnClickMallTab);
|
||||
ui.com_di.btn_shop.SetClickDownEffect(0.8f, 1);
|
||||
ui.com_di.btn_fight.SetClickDownEffect(0.8f, 1);
|
||||
ui.com_di.btn_shop.SetClick(OnClickMallTab);
|
||||
ui.com_di.btn_main.SetClick(OnClickMainTab);
|
||||
ui.com_di.btn_tab_redem.SetClick(OnClickRedeemTab);
|
||||
ui.com_di.btn_hall.SetClick(OnClickHall);
|
||||
|
||||
ui.com_di.btn_fight.SetClick(OnClickfight);
|
||||
if (GameHelper.IsGiftSwitch() && Random.Range(0, 100) < ConfigSystem.GetConfig<CommonModel>().loginhallrate && (PlayerPrefs.GetInt("first_", 0) == 1))
|
||||
{
|
||||
OnClickHall();
|
||||
@@ -130,6 +130,11 @@ namespace BingoBrain
|
||||
{
|
||||
OnGameTab(3);
|
||||
|
||||
}
|
||||
public void OnClickfight()
|
||||
{
|
||||
OnGameTab(4);
|
||||
|
||||
}
|
||||
public void OnGameTab(object obj)
|
||||
{
|
||||
@@ -144,9 +149,9 @@ namespace BingoBrain
|
||||
private void OnChangeTab(int tabIndex)
|
||||
{
|
||||
ui.com_di.btn_main.cont_select.selectedIndex = tabIndex == 0 ? btn_main.Select_select : btn_main.Select_none;
|
||||
ui.com_di.btn_h5.cont_select.selectedIndex = tabIndex == 1 ? btn_h5.Select_select : btn_h5.Select_none;
|
||||
ui.com_di.btn_shop.cont_select.selectedIndex = tabIndex == 1 ? btn_h5.Select_select : btn_h5.Select_none;
|
||||
ui.com_di.btn_tab_redem.cont_select.selectedIndex = tabIndex == 2 ? btn_todo.Select_select : btn_todo.Select_none;
|
||||
ui.com_di.btn_hall.cont_select.selectedIndex = tabIndex == 3 ? btn_todo.Select_select : btn_todo.Select_none;
|
||||
ui.com_di.btn_fight.cont_select.selectedIndex = tabIndex == 4 ? btn_todo.Select_select : btn_todo.Select_none;
|
||||
}
|
||||
|
||||
private void OnClickTab(int tabIndex)
|
||||
@@ -155,6 +160,7 @@ namespace BingoBrain
|
||||
UICtrlDispatcher.Instance.Dispatch(tabIndex == 0 ? SkinInfo.BingoHallUI_Open : SkinInfo.BingoHallUI_Close);
|
||||
UICtrlDispatcher.Instance.Dispatch(tabIndex == 2 ? SkinInfo.BasptUI_Open : SkinInfo.BasptUI_Close);
|
||||
UICtrlDispatcher.Instance.Dispatch(tabIndex == 3 ? SkinInfo.H5UI_Open : SkinInfo.H5UI_Close);
|
||||
ui.show_fight.selectedIndex = tabIndex == 4 ? 1 :0;
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.SmailUI_Open);
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.BottomUI_Open);
|
||||
Battle.Instance.SetBg(true);
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace BingoBrain
|
||||
Set102();
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
(ui.btn_cash as com_102).gift.selectedIndex = 1;
|
||||
(ui.btn_cash as btn_102).gift.selectedIndex = 1;
|
||||
(ui.btn_ballon as btn_balloon).gift.selectedIndex = 1;
|
||||
|
||||
}
|
||||
@@ -387,7 +387,7 @@ namespace BingoBrain
|
||||
item.scale = Vector2.one;
|
||||
item.alpha = 1;
|
||||
// item.position = new Vector2(5, -140);
|
||||
item.displayObject.gameObject.transform.localPosition = new Vector3(5, -140);
|
||||
item.displayObject.gameObject.transform.localPosition = new Vector3(1100, -42);
|
||||
var localPos = GameHelper.FguiToUnityLocalPot(showComNumPot[4]);
|
||||
|
||||
item.displayObject.gameObject.transform.DOLocalMoveX(localPos.x, aniTime).SetEase(Ease.Linear);
|
||||
|
||||
@@ -4,6 +4,8 @@ using DG.Tweening;
|
||||
using BingoBrain.Core;
|
||||
using FGUI.JWheel;
|
||||
using System.Collections.Generic;
|
||||
using Spine.Unity;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
@@ -18,6 +20,7 @@ namespace BingoBrain
|
||||
private bool isClickSpin;
|
||||
private Action CloseCb;
|
||||
private ParticleSystem fx_zhuangpan_enter;
|
||||
private SkeletonAnimation wheel_ani;
|
||||
|
||||
public BingoToyUI(BingoToyUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
@@ -57,13 +60,18 @@ namespace BingoBrain
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
Audio.Instance.PlayDynamicEffect("pop_open");
|
||||
FX.Instance.SetFx<ParticleSystem>(ui.gp_Fx, Fx_Type.fx_zhuangpan_enter, ps =>
|
||||
{
|
||||
fx_zhuangpan_enter = ps;
|
||||
fx_zhuangpan_enter.gameObject.SetActive(false);
|
||||
}, CloseCb);
|
||||
FX.Instance.SetFx<ParticleSystem>(ui.com_wheels.gp_Select, Fx_Type.fx_zhuanpan_Select,
|
||||
ps => { ps.transform.localPosition = new Vector3(0, 195, 0); }, CloseCb);
|
||||
// FX.Instance.SetFx<ParticleSystem>(ui.gp_Fx, Fx_Type.fx_zhuangpan_enter, ps =>
|
||||
// {
|
||||
// fx_zhuangpan_enter = ps;
|
||||
// fx_zhuangpan_enter.gameObject.SetActive(false);
|
||||
// }, CloseCb);
|
||||
FX.Instance.SetFx<SkeletonAnimation>(ui.gp_Fx, Fx_Type.fx_wheel,
|
||||
ps =>
|
||||
{
|
||||
// ps.transform.localPosition = new Vector3(0, 195, 0);
|
||||
wheel_ani = ps;
|
||||
NAAVsa.PlayAnim(wheel_ani, "daiji", true);
|
||||
}, CloseCb);
|
||||
|
||||
ui.com_wheels.gp_Select.visible = false;
|
||||
|
||||
@@ -115,21 +123,21 @@ namespace BingoBrain
|
||||
// PreferencesMgr.Instance.VidelWheelLst.Count < turntableModel.GetCount())
|
||||
// {
|
||||
Debug.Log("????????????????ttttttttttttttttt");
|
||||
PreferencesMgr.Instance.FerrWheelLst.Clear();
|
||||
PreferencesMgr.Instance.VidelWheelLst.Clear();
|
||||
var list = turntableModel.GetDataList();
|
||||
foreach (var item in list)
|
||||
{
|
||||
PreferencesMgr.Instance.FerrWheelLst.Add(
|
||||
item.quantityA[GameHelper.GetDynamicIndex(item.wheel_itemA)]);
|
||||
PreferencesMgr.Instance.VidelWheelLst.Add(
|
||||
item.quantityB[GameHelper.GetDynamicIndex(item.wheel_itemB)]);
|
||||
}
|
||||
PreferencesMgr.Instance.FerrWheelLst.Clear();
|
||||
PreferencesMgr.Instance.VidelWheelLst.Clear();
|
||||
var list = turntableModel.GetDataList();
|
||||
foreach (var item in list)
|
||||
{
|
||||
PreferencesMgr.Instance.FerrWheelLst.Add(
|
||||
item.quantityA[GameHelper.GetDynamicIndex(item.wheel_itemA)]);
|
||||
PreferencesMgr.Instance.VidelWheelLst.Add(
|
||||
item.quantityB[GameHelper.GetDynamicIndex(item.wheel_itemB)]);
|
||||
}
|
||||
|
||||
PreferencesMgr.Instance.SaveFerrWheelLst();
|
||||
PreferencesMgr.Instance.SaveVidelWheelLst();
|
||||
PreferencesMgr.Instance.WheelVersion = GameHelper.GetDynamicVersion();
|
||||
// }
|
||||
PreferencesMgr.Instance.SaveFerrWheelLst();
|
||||
PreferencesMgr.Instance.SaveVidelWheelLst();
|
||||
PreferencesMgr.Instance.WheelVersion = GameHelper.GetDynamicVersion();
|
||||
// }
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
@@ -144,10 +152,11 @@ namespace BingoBrain
|
||||
private void RefreshUI(object o = null)
|
||||
{
|
||||
var turntableModel = GameHelper.GetConfig<TurntableModel>();
|
||||
|
||||
for (var i = 0; i < com_RewardLst.Count; i++)
|
||||
{
|
||||
var rewards = com_RewardLst[i];
|
||||
if (GameHelper.IsGiftSwitch()) rewards.gift.selectedIndex = 1;
|
||||
if (GameHelper.IsGiftSwitch()) rewards.gift.selectedIndex = 1;
|
||||
var turntable = turntableModel.GetData(i + 1);
|
||||
int id;
|
||||
string val;
|
||||
@@ -161,6 +170,10 @@ namespace BingoBrain
|
||||
else
|
||||
{
|
||||
id = turntable.wheel_itemB;
|
||||
if(id == 101)
|
||||
{
|
||||
PreferencesMgr.Instance.VidelWheelLst[i]=MathF.Ceiling(PreferencesMgr.Instance.VidelWheelLst[i]);
|
||||
}
|
||||
val = id == 102
|
||||
? GameHelper.Get102Str((decimal)PreferencesMgr.Instance.VidelWheelLst[i])
|
||||
: PreferencesMgr.Instance.VidelWheelLst[i].ToString();
|
||||
@@ -213,7 +226,6 @@ namespace BingoBrain
|
||||
ui.btn_spin.grayed = true;
|
||||
ui.com_Spinn.touchable = false;
|
||||
ui.com_Spinn.cont_spin.selectedIndex = com_spin.Spin_grey;
|
||||
ui.closeButton.touchable = false;
|
||||
ui.com_wheels.rotation = 0;
|
||||
var index = PreferencesMgr.Instance.IsOnceWheel
|
||||
? GlobalHarmony.RandomWeight(freeWeight)
|
||||
@@ -222,9 +234,9 @@ namespace BingoBrain
|
||||
var turntableModel = GameHelper.GetConfig<TurntableModel>();
|
||||
var vo = turntableModel.GetData(index + 1);
|
||||
|
||||
var angle = UnityEngine.Random.Range(3600 - (vo.Seq - 1) * 45 - 10, 3600 - (vo.Seq - 1) * 45 + 10) +
|
||||
22.5f;
|
||||
|
||||
var angle = UnityEngine.Random.Range(3600 - (vo.Seq - 1) * 45, 3600 - (vo.Seq - 1) * 45)
|
||||
;
|
||||
NAAVsa.PlayAnim(wheel_ani, "zhuandong", true);
|
||||
Audio.Instance.PlayDynamicEffect("wheel_spin");
|
||||
ui.fx_zhen.Play();
|
||||
DOTween.To(() => ui.com_wheels.rotation, (e) => ui.com_wheels.rotation = e, angle, model.animationTime)
|
||||
@@ -237,10 +249,10 @@ namespace BingoBrain
|
||||
private void OpenReceivePlane(Turntable vo)
|
||||
{
|
||||
ui.fx_zhen.Stop();
|
||||
ui.img_zhen.rotation = 0;
|
||||
// ui.img_zhen.rotation = 0;
|
||||
ui.com_wheels.gp_Select.visible = true;
|
||||
ui.com_wheels.gp_Select.rotation = (vo.Seq - 2) * 45 + 22.5f;
|
||||
|
||||
NAAVsa.PlayAnim(wheel_ani, "zhongjiang", true);
|
||||
DOVirtual.DelayedCall(1.5f, () =>
|
||||
{
|
||||
ui.com_wheels.gp_Select.visible = false;
|
||||
@@ -252,12 +264,13 @@ namespace BingoBrain
|
||||
ui.btn_spin.grayed = false;
|
||||
ui.closeButton.grayed = false;
|
||||
ui.com_Spinn.cont_spin.selectedIndex = com_spin.Spin_none;
|
||||
NAAVsa.PlayAnim(wheel_ani, "daiji", true);
|
||||
if (PreferencesMgr.Instance.IsOnceWheel)
|
||||
{
|
||||
ui.closeButton.touchable = false;
|
||||
ui.btn_spin.touchable = false;
|
||||
// ui.closeButton.touchable = false;
|
||||
// ui.btn_spin.touchable = false;
|
||||
ui.com_Spinn.touchable = false;
|
||||
ui.btn_spin.grayed = true;
|
||||
// ui.btn_spin.grayed = true;
|
||||
|
||||
GameHelper.GetRewardExtra(vo.wheel_itemA, (decimal)PreferencesMgr.Instance.FerrWheelLst[vo.Seq - 1],
|
||||
vo.cont_index, isCompleted =>
|
||||
@@ -285,6 +298,7 @@ namespace BingoBrain
|
||||
ui.btn_spin.grayed = false;
|
||||
Audio.Instance.PlayDynamicEffect("wheel_show");
|
||||
}));
|
||||
|
||||
});
|
||||
}
|
||||
else
|
||||
|
||||
@@ -9,6 +9,7 @@ using Spine.Unity;
|
||||
using BingoBrain.Core;
|
||||
using FGUI.ACommon;
|
||||
using FairyGUI;
|
||||
using BingoBrain.HotFix;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
@@ -28,7 +29,7 @@ namespace BingoBrain
|
||||
{
|
||||
uiInfo.packageName = "ACommon";
|
||||
uiInfo.assetName = "com_broadcast1";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.layerType = UILayerType.Normal;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = false;
|
||||
@@ -76,8 +77,8 @@ namespace BingoBrain
|
||||
// ConfigSystem.GetConfig<exBrPoolModel_2>().dataList[0]
|
||||
config_name_list = exBrPoolModel.config_name_list;
|
||||
config_money_list = exBrPoolModel.config_money_list;
|
||||
GameDispatcher.Instance.AddListener(GameMsg.hideBroadCast, hideEvent);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.showBroadCast, showEvent);
|
||||
// GameDispatcher.Instance.AddListener(GameMsg.hideBroadCast, hideEvent);
|
||||
// GameDispatcher.Instance.AddListener(GameMsg.showBroadCast, showEvent);
|
||||
// UICtrlDispatcher.Instance.AddListener(UICtrlMsg.MainUI_Open, Settop);
|
||||
// UICtrlDispatcher.Instance.AddListener(UICtrlMsg.RainPlayUI_Open, Setbuttom);
|
||||
}
|
||||
@@ -137,7 +138,7 @@ namespace BingoBrain
|
||||
|
||||
private void OpenRecord()
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RecordViewUI_Open);
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.RecordViewUI_Open);
|
||||
}
|
||||
private void hideEvent(object sender = null)
|
||||
{
|
||||
@@ -214,7 +215,7 @@ namespace BingoBrain
|
||||
ui.t1.Play();
|
||||
});
|
||||
string str = name + "-" + config_money_list[money_index] + "-" + DateTimeBoardk.Instance.GetCurrDateTime();
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.updateRecordList, str);
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.updateRecordList, str);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace BingoBrain
|
||||
private BroadcastUI ui;
|
||||
private BroadcastModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.BroadcastUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.BroadcastUI_Close;
|
||||
private uint openUIMsg = SkinInfo.BroadcastUI_Open;
|
||||
private uint closeUIMsg = SkinInfo.BroadcastUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b5ee8e7c4872b428b8efc7420ec10edc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,48 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class BuygoldCtrl : BaseCtrl
|
||||
{
|
||||
public static BuygoldCtrl Instance { get; private set; }
|
||||
|
||||
private BuygoldModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.BuygoldModel) as BuygoldModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2342594a3679d4cc3871150e477d7ffb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,48 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class BuygoldModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 读取数据
|
||||
protected override void OnReadData()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 本地存储
|
||||
protected override void WriteLocalStorage()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14fccb4c1b1fb4e7188a1c7a070629dc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,394 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using FairyGUI;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
using FGUI.G012_openReward_animal;
|
||||
using FGUI.G003_play_animal;
|
||||
using System;
|
||||
using DG.Tweening;
|
||||
using Newtonsoft.Json;
|
||||
using BingoBrain.HotFix;
|
||||
using DontConfuse;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class BuygoldUI : BaseUI
|
||||
{
|
||||
private BuygoldUICtrl ctrl;
|
||||
private BuygoldModel model;
|
||||
private FGUI.G012_openReward_animal.com_buygold ui;
|
||||
|
||||
|
||||
public BuygoldUI(BuygoldUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.BuygoldUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "G012_openReward_animal";
|
||||
uiInfo.assetName = "com_buygold";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.BuygoldModel) as BuygoldModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
GameHelper.showGameUI = true;
|
||||
Hall.Instance.UpdateSecondEvent -= initList;
|
||||
Hall.Instance.UpdateSecondEvent -= upWatchAdsBtn;
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.G012_openReward_animal.com_buygold;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
|
||||
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
ui.top_gold.y += Screen.safeArea.y - 15;
|
||||
}
|
||||
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.gold_show, 1);
|
||||
|
||||
WebviewManager.Instance.SetDarkThough(false);
|
||||
|
||||
ui.top_gold.GetChild("number_text").text = GameHelper.Get101Str(GameHelper.GetGoldNumber());
|
||||
ui.pay_type.selectedIndex = !GameHelper.IsAdModelOfPay() ? 1 : 0;
|
||||
|
||||
InitView();
|
||||
|
||||
|
||||
Hall.Instance.UpdateSecondEvent += initList;
|
||||
Hall.Instance.UpdateSecondEvent += upWatchAdsBtn;
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
GameDispatcher.Instance.AddListener(GameMsg.apple_pay_success, pay_success);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success);
|
||||
}
|
||||
#endregion
|
||||
|
||||
void GetAward(decimal gold, int index)
|
||||
{
|
||||
var item = ui.list.GetChildAt(index);
|
||||
var start = GameHelper.GetUICenterPosition(item);
|
||||
var end = GameHelper.GetUICenterPosition(ui.top_gold.GetChild("number_text"));
|
||||
|
||||
var rewardData = new RewardData();
|
||||
var rewardSingleData = new Goda(101, gold, RewardOrigin.BuyGold)
|
||||
{
|
||||
startPosition = start,
|
||||
endPosition = end
|
||||
};
|
||||
rewardData.AddReward(rewardSingleData);
|
||||
rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
|
||||
rewardData.AddCompleted((isScu) =>
|
||||
{
|
||||
DOVirtual.DelayedCall(0.5f, () =>
|
||||
{
|
||||
var startNum = PreferencesMgr.Instance.Currency101 - gold;
|
||||
DOVirtual.Float((float)startNum, (float)GameHelper.GetGoldNumber(), 1f,
|
||||
value => { ui.top_gold.GetChild("number_text").text = GameHelper.Get101Str((decimal)value); });
|
||||
});
|
||||
});
|
||||
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.GetReward, rewardData);
|
||||
}
|
||||
|
||||
void pay_success(object str)
|
||||
{
|
||||
string type = (string)str;
|
||||
string purch_number = "";
|
||||
|
||||
if (type.StartsWith("buy_gold"))
|
||||
{
|
||||
int startIndex = "buy_gold".Length;
|
||||
string suffix = type[startIndex..]; // 截取 "gold" 后的所有字符
|
||||
int suffix_num = int.Parse(suffix);
|
||||
|
||||
SaveData.GetSaveobject()._goldtime[suffix_num] = (int)GameHelper.GetNowTime();
|
||||
SaveData.saveDataFunc();
|
||||
GetAward(list[suffix_num].Actual_coins, suffix_num);
|
||||
purch_number = list[suffix_num].Payment_amount.ToString();
|
||||
}
|
||||
|
||||
// if (purch_number != "")
|
||||
// {
|
||||
// GameHelper.SendRevenueToAF(purch_number);
|
||||
// }
|
||||
SetTextString();
|
||||
}
|
||||
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
|
||||
ui.top_gold.touchable = false;
|
||||
ui.btn_close.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Close); });
|
||||
|
||||
initList();
|
||||
upWatchAdsBtn();
|
||||
|
||||
|
||||
ui.btn_watch.SetClick(() =>
|
||||
{
|
||||
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.gold_click_ad, 1);
|
||||
|
||||
GameHelper.ShowVideoAd("BuyGold", (issuccess) =>
|
||||
{
|
||||
if (issuccess)
|
||||
{
|
||||
var ad_times = Convert.ToInt32(GameHelper.GetNowTime());
|
||||
SaveData.GetSaveobject().look_ad_time = ad_times + GameHelper.GetCommonModel().exchangeCD;
|
||||
initList();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
private List<Paidcoins> list = ConfigSystem.GetConfig<PaidcoinsModel>().dataList;
|
||||
|
||||
void initList()
|
||||
{
|
||||
ui.list.itemRenderer = setRemaintime;
|
||||
ui.list.numItems = list.Count;
|
||||
|
||||
SetTextString();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void upWatchAdsBtn()
|
||||
{
|
||||
var lastTimes = SaveData.GetSaveobject().look_ad_time;
|
||||
ui.btn_watch.img_saveingpot.visible = false;
|
||||
if (GameHelper.GetNowTime() < lastTimes)
|
||||
{
|
||||
ui.btn_watch.enabled = false;
|
||||
ui.btn_watch.can_buy.selectedIndex = 1;
|
||||
ui.btn_watch.btn_text.text = GameHelper.TimeFormat(lastTimes - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) ui.btn_watch.img_saveingpot.visible = true;
|
||||
ui.btn_watch.enabled = true;
|
||||
ui.btn_watch.can_buy.selectedIndex = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void SetTextString()
|
||||
{
|
||||
var myAds = SaveData.GetSaveobject().look_ad_numbers;
|
||||
ui.text_have.text = "Owner ADs: " + SaveData.GetSaveobject().look_ad_numbers;
|
||||
}
|
||||
|
||||
void setRemaintime(int index, GObject obj)
|
||||
{
|
||||
buygold_item item = (buygold_item)obj;
|
||||
|
||||
int time = 0;
|
||||
time = SaveData.GetSaveobject()._goldtime[index];
|
||||
|
||||
item.coin_text.text = GameHelper.Get101Str(list[index].Actual_coins);
|
||||
item.index.selectedIndex = index > 4 ? 4 : index;
|
||||
item.btn_buy.img_saveingpot.visible = false;
|
||||
item.off_text.text = list[index].Discount_rate + "%";
|
||||
item.discount.visible = !GameHelper.IsAdModelOfPay() && list[index].Discount_rate > 0;
|
||||
item.btn_buy.img_saveingpot.visible = false;
|
||||
if (time + list[index].receive_CD < GameHelper.GetNowTime())
|
||||
{
|
||||
if (index == 0)
|
||||
{
|
||||
item.btn_buy.btn_text.text = "Free";
|
||||
item.discount.visible = false;
|
||||
item.btn_buy.y = 331;
|
||||
|
||||
item.need_text.visible = true;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!GameHelper.IsAdModelOfPay())
|
||||
{
|
||||
decimal price = (decimal)list[index].Payment_amount2;
|
||||
item.btn_buy.btn_text.text = GameHelper.Get102Str(price);
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) item.btn_buy.img_saveingpot.visible = true;
|
||||
item.need_text.visible = false;
|
||||
item.btn_buy.y = 364;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.btn_buy.btn_text.text = "Exchange";
|
||||
double gold_price1 = list[index].Payment_amount;
|
||||
int needAds = (int)Math.Ceiling(gold_price1);
|
||||
item.need_text.SetVar("num", needAds.ToString()).FlushVars();
|
||||
}
|
||||
}
|
||||
|
||||
item.btn_buy.can_buy.selectedIndex = 0;
|
||||
item.btn_buy.SetClick(() =>
|
||||
{
|
||||
if (index == 0)
|
||||
{
|
||||
SaveData.GetSaveobject()._goldtime[0] = (int)GameHelper.GetNowTime();
|
||||
SaveData.saveDataFunc();
|
||||
GetAward(list[index].Actual_coins, 0);
|
||||
|
||||
InitView();
|
||||
}
|
||||
else
|
||||
{
|
||||
redeem_Gold(index);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
item.btn_buy.can_buy.selectedIndex = 1;
|
||||
if (!GameHelper.IsAdModelOfPay())
|
||||
{
|
||||
item.need_text.visible = false;
|
||||
item.btn_buy.y = 364;
|
||||
}
|
||||
else
|
||||
{
|
||||
double gold_price1 = list[index].Payment_amount;
|
||||
int needAds = (int)Math.Ceiling(gold_price1);
|
||||
item.need_text.SetVar("num", needAds.ToString()).FlushVars();
|
||||
}
|
||||
item.btn_buy.btn_text.text = GameHelper.TimeFormat(time + list[index].receive_CD - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
item.btn_buy.SetClick(() =>
|
||||
{
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void redeem_Gold(int index)
|
||||
{
|
||||
string _type = "buy_gold" + index.ToString();
|
||||
if (GameHelper.IsAdModelOfPay())
|
||||
{
|
||||
if (SaveData.GetSaveobject().look_ad_numbers >= list[index].Payment_amount)
|
||||
{
|
||||
ApplePayClass test = new()
|
||||
{
|
||||
sku = _type,
|
||||
};
|
||||
SaveData.GetSaveobject().look_ad_numbers -= (int)list[index].Payment_amount;
|
||||
PurchasingManager.Instance.Purchase(PurchasingManager.pack_reward, test);
|
||||
string eventName = $"gold_success_{index}";
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, eventName, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameHelper.ShowTips("Your AD count is insufficient!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
decimal price = (decimal)list[index].Payment_amount2;
|
||||
MaxPayClass maxPayData = new()
|
||||
{
|
||||
amount = (int)Math.Round(price * 100),
|
||||
sku = _type,
|
||||
currency = "USD"
|
||||
};
|
||||
MaxPayManager.Instance.Buy(maxPayData);
|
||||
}
|
||||
}
|
||||
}
|
||||
public static partial class GameMsg
|
||||
{
|
||||
private static uint Cursor_BASE = 55555;
|
||||
public static readonly uint OpenGame = ++Cursor_BASE;
|
||||
public static readonly uint Update111Completed = ++Cursor_BASE;
|
||||
public static readonly uint BackMainScene = ++Cursor_BASE;
|
||||
public static readonly uint Update101Completed = ++Cursor_BASE;
|
||||
public static readonly uint Update102Completed = ++Cursor_BASE;
|
||||
public static uint Slot_refresh = ++Cursor_BASE;
|
||||
public static uint Remake_state = ++Cursor_BASE;
|
||||
public static readonly uint MakeupSuccess = ++Cursor_BASE;
|
||||
|
||||
public static uint Ad_success = ++Cursor_BASE;
|
||||
public static uint UpdateHotFixMax = ++Cursor_BASE;
|
||||
public static uint UpdateHotFixProgress = ++Cursor_BASE;
|
||||
public static readonly uint RefreshTodoUI = ++Cursor_BASE;
|
||||
public static readonly uint RefreshMakeupData = ++Cursor_BASE;
|
||||
public static uint Gold_refresh = ++Cursor_BASE;
|
||||
public static uint Sheep_item_refresh = ++Cursor_BASE;
|
||||
public static uint card_click = ++Cursor_BASE;
|
||||
|
||||
public static uint RefreshADTask = ++Cursor_BASE;
|
||||
|
||||
public static readonly uint ProcessReward = ++Cursor_BASE;
|
||||
|
||||
public static readonly uint Update101 = ++Cursor_BASE;
|
||||
public static readonly uint Update102 = ++Cursor_BASE;
|
||||
public static readonly uint MakeUpConfirmUIClosed = ++Cursor_BASE;
|
||||
|
||||
public static readonly uint Update111 = ++Cursor_BASE;
|
||||
public static uint reset_game = ++Cursor_BASE;
|
||||
public static uint GetTaskReward = ++Cursor_BASE;
|
||||
public static uint pack_close = ++Cursor_BASE;
|
||||
public static uint RefreshRedDot = ++Cursor_BASE;
|
||||
public static uint resetH5progress = ++Cursor_BASE;
|
||||
public static uint RefreshGame = ++Cursor_BASE;
|
||||
public static uint apple_pay_success = ++Cursor_BASE;
|
||||
public static readonly uint H5ViewClickBtn = ++Cursor_BASE;
|
||||
public static uint hideBroadCast = ++Cursor_BASE;
|
||||
public static uint showBroadCast = ++Cursor_BASE;
|
||||
public static uint backHall = ++Cursor_BASE;
|
||||
public static uint sendLog = ++Cursor_BASE;
|
||||
public static uint checkGameState = ++Cursor_BASE;
|
||||
public static uint Network_reconnection = ++Cursor_BASE;
|
||||
public static uint resurgence = ++Cursor_BASE;
|
||||
public static uint resurgence_close = ++Cursor_BASE;
|
||||
public static uint RefreshSaveingPot = ++Cursor_BASE;
|
||||
public static uint updateRecordList = ++Cursor_BASE;
|
||||
public static uint rewardMul_close = ++Cursor_BASE;
|
||||
public static uint ThreeDaysGiftUIClose = ++Cursor_BASE;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7de4ee29003a34adbb4ff4e0c97ed52c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class BuygoldUICtrl : BaseUICtrl
|
||||
{
|
||||
private BuygoldUI ui;
|
||||
private BuygoldModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.BuygoldUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.BuygoldUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.BuygoldModel) as BuygoldModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new BuygoldUI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.Close();
|
||||
}
|
||||
ui = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
public override uint GetOpenUIMsg(string uiName)
|
||||
{
|
||||
return openUIMsg;
|
||||
}
|
||||
public override uint GetCloseUIMsg(string uiName)
|
||||
{
|
||||
return closeUIMsg;
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfad94d0fa70d40bd8308f8fb11b9520
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f00fc915c8def4400a78c058b49d0ede
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,48 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class BuyslotCtrl : BaseCtrl
|
||||
{
|
||||
public static BuyslotCtrl Instance { get; private set; }
|
||||
|
||||
private BuyslotModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.BuyslotModel) as BuyslotModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b6058e09514454ec394a1478f2775964
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,48 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class BuyslotModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 读取数据
|
||||
protected override void OnReadData()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 本地存储
|
||||
protected override void WriteLocalStorage()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b0a4fbab97e64d5b982896192bb6483
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,182 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using FairyGUI;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
using FGUI.G006_menu_animal;
|
||||
using FGUI.Common_animal;
|
||||
using System;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class BuyslotUI : BaseUI
|
||||
{
|
||||
private BuyslotUICtrl ctrl;
|
||||
private BuyslotModel model;
|
||||
private FGUI.G006_menu_animal.com_buyslot ui;
|
||||
|
||||
public BuyslotUI(BuyslotUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.BuyslotUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "G006_menu_animal";
|
||||
uiInfo.assetName = "com_buyslot";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.BuyslotModel) as BuyslotModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
GameHelper.showGameUI = true;
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.G006_menu_animal.com_buyslot;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
InitView();
|
||||
GameHelper.showGameUI = false;
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event,BuriedPointEvent.buy_one_show,1);
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
GameDispatcher.Instance.AddListener(GameMsg.apple_pay_success, pay_success);
|
||||
Hall.Instance.UpdateSecondEvent += InitView;
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success);
|
||||
Hall.Instance.UpdateSecondEvent -= InitView;
|
||||
}
|
||||
#endregion
|
||||
void pay_success(object str)
|
||||
{
|
||||
string type = (string)str;
|
||||
|
||||
if (type == PurchasingManager.buy_one)
|
||||
{
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuyslotUI_Close);
|
||||
// SaveData.GetSaveobject().have_slot = true;
|
||||
// SaveData.saveDataFunc();
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.Slot_refresh);
|
||||
CtrlCloseUI();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
ui.btn_close.SetClick(CtrlCloseUI);
|
||||
|
||||
if (!GameHelper.IsAdModelOfPay()){
|
||||
ui.pay_type.selectedIndex = 1;
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) (ui.btn_max_pay.GetChild("img_saveingpot") as GImage).visible = true;
|
||||
|
||||
decimal price = (decimal)GameHelper.GetCommonModel().addspace2;
|
||||
ui.btn_max_pay.title = GameHelper.Get102Str(price);
|
||||
ui.btn_max_pay.SetClick(() => {
|
||||
MaxPayClass maxPayData = new()
|
||||
{
|
||||
amount = (int)Math.Round(price * 100),
|
||||
sku = MaxPayManager.buy_one,
|
||||
currency = "USD"
|
||||
};
|
||||
MaxPayManager.Instance.Buy(maxPayData);
|
||||
});
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
ui.pay_type.selectedIndex = 0;
|
||||
|
||||
ui.text_have.text = "Owner ADs:" + SaveData.GetSaveobject().look_ad_numbers;
|
||||
ui.need_text.text = "need " + ConfigSystem.GetConfig<CommonModel>().addspace + " ADs";
|
||||
|
||||
|
||||
btn_green btn_buy = ui.btn_buy as btn_green;
|
||||
btn_buy.img_saveingpot.visible = false;
|
||||
if (SaveData.GetSaveobject().look_ad_numbers >= ConfigSystem.GetConfig<CommonModel>().addspace)
|
||||
{
|
||||
btn_buy.state.selectedIndex = 1;
|
||||
btn_buy.cooldown.selectedIndex = 0;
|
||||
ui.btn_buy.SetClick(() =>
|
||||
{
|
||||
ApplePayClass test = new ApplePayClass()
|
||||
{
|
||||
|
||||
sku = PurchasingManager.buy_one,
|
||||
|
||||
};
|
||||
SaveData.GetSaveobject().look_ad_numbers -= (int)ConfigSystem.GetConfig<CommonModel>().addspace;
|
||||
PurchasingManager.Instance.Purchase(PurchasingManager.buy_one, test);
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.buy_one_success, 1);
|
||||
});
|
||||
}
|
||||
else if (SaveData.GetSaveobject().look_ad_time > GameHelper.GetNowTime())
|
||||
{
|
||||
btn_buy.state.selectedIndex = 0;
|
||||
btn_buy.cooldown.selectedIndex = 1;
|
||||
btn_buy.text = GameHelper.TimeFormat(SaveData.GetSaveobject().look_ad_time - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
btn_buy.SetClick(() =>
|
||||
{
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
btn_buy.state.selectedIndex = 0;
|
||||
btn_buy.cooldown.selectedIndex = 0;
|
||||
btn_buy.text = "Watch AD";
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) btn_buy.img_saveingpot.visible = true;
|
||||
btn_buy.SetClick(() =>
|
||||
{
|
||||
GameHelper.ShowVideoAd("Pass", (issuccess) =>
|
||||
{
|
||||
if (issuccess)
|
||||
{
|
||||
SaveData.GetSaveobject().look_ad_time = (int)GameHelper.GetNowTime() + GameHelper.GetCommonModel().exchangeCD;
|
||||
InitView();
|
||||
|
||||
}
|
||||
});
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.buy_one_click, 1);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 40b42d370a2c34db89da3decb4b3ba0d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class BuyslotUICtrl : BaseUICtrl
|
||||
{
|
||||
private BuyslotUI ui;
|
||||
private BuyslotModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.BuyslotUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.BuyslotUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.BuyslotModel) as BuyslotModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new BuyslotUI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.Close();
|
||||
}
|
||||
ui = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
public override uint GetOpenUIMsg(string uiName)
|
||||
{
|
||||
return openUIMsg;
|
||||
}
|
||||
public override uint GetCloseUIMsg(string uiName)
|
||||
{
|
||||
return closeUIMsg;
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4c4feca1f3dc94e0291dbe534b773067
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -97,16 +97,16 @@ namespace BingoBrain
|
||||
openDebug();
|
||||
});
|
||||
|
||||
ui.btn_debug.SetClick(() =>
|
||||
{
|
||||
OnclickDebug();
|
||||
});
|
||||
// ui.btn_debug.SetClick(() =>
|
||||
// {
|
||||
// OnclickDebug();
|
||||
// });
|
||||
#if BingoBrainRelease
|
||||
ui.btn_debug.visible = false;
|
||||
ui.btn_showmax.visible = false;
|
||||
#endif
|
||||
}
|
||||
int debugTimes = 0;
|
||||
private void OnclickDebug()
|
||||
private void OnclickDebug()
|
||||
{
|
||||
debugTimes++;
|
||||
GameHelper.ShowTips($"时间已设置为{debugTimes}天后。");
|
||||
@@ -140,31 +140,31 @@ namespace BingoBrain
|
||||
|
||||
public void OnClickBtn()
|
||||
{
|
||||
WebviewManager.Instance.SetFullScreen();
|
||||
int flyswitch = ConfigSystem.GetConfig<CommonModel>().flyswitch;
|
||||
int propswitch = ConfigSystem.GetConfig<CommonModel>().propswitch;
|
||||
// WebviewManager.Instance.SetFullScreen();
|
||||
// int flyswitch = ConfigSystem.GetConfig<CommonModel>().flyswitch;
|
||||
// int propswitch = ConfigSystem.GetConfig<CommonModel>().propswitch;
|
||||
|
||||
|
||||
float top_offset = 170;//fgui中的顶部信息的高度
|
||||
float buttom_offset = 178;
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
top_offset += Screen.safeArea.y;
|
||||
}
|
||||
int offset_y = ConfigSystem.GetConfig<CommonModel>().WVOffset[0];
|
||||
int offset_y1 = ConfigSystem.GetConfig<CommonModel>().WVOffset[1];
|
||||
WebviewManager.Instance.SetPadding(0, top_offset / GRoot.inst.height, 0, buttom_offset / GRoot.inst.height);
|
||||
WebviewManager.Instance.SetOffset(offset_y, offset_y1);
|
||||
// float top_offset = 170;//fgui中的顶部信息的高度
|
||||
// float buttom_offset = 178;
|
||||
// if (Screen.safeArea.y != 0)
|
||||
// {//刘海屏
|
||||
// top_offset += Screen.safeArea.y;
|
||||
// }
|
||||
// int offset_y = ConfigSystem.GetConfig<CommonModel>().WVOffset[0];
|
||||
// int offset_y1 = ConfigSystem.GetConfig<CommonModel>().WVOffset[1];
|
||||
// WebviewManager.Instance.SetPadding(0, top_offset / GRoot.inst.height, 0, buttom_offset / GRoot.inst.height);
|
||||
// WebviewManager.Instance.SetOffset(offset_y, offset_y1);
|
||||
|
||||
|
||||
WebviewManager.Instance.RefreshUrl();
|
||||
Debug.Log($"flyswitch==1 ------ {flyswitch == 1}");
|
||||
Debug.Log($"propswitch==1 ------ {propswitch == 1}");
|
||||
WebviewManager.Instance.setFlyBtnTag(flyswitch == 1);
|
||||
WebviewManager.Instance.setRewardBtnTag(propswitch == 1);
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
WebviewManager.Instance.ShowH5View(false);
|
||||
WebviewManager.Instance.SetBtn(ConfigSystem.GetConfig<CommonModel>().propCoord[0], ConfigSystem.GetConfig<CommonModel>().propCoord[1], 60, 60);
|
||||
// WebviewManager.Instance.RefreshUrl();
|
||||
// Debug.Log($"flyswitch==1 ------ {flyswitch == 1}");
|
||||
// Debug.Log($"propswitch==1 ------ {propswitch == 1}");
|
||||
// WebviewManager.Instance.setFlyBtnTag(flyswitch == 1);
|
||||
// WebviewManager.Instance.setRewardBtnTag(propswitch == 1);
|
||||
// WebviewManager.Instance.SetDarkThough(true);
|
||||
// WebviewManager.Instance.ShowH5View(false);
|
||||
// WebviewManager.Instance.SetBtn(ConfigSystem.GetConfig<CommonModel>().propCoord[0], ConfigSystem.GetConfig<CommonModel>().propCoord[1], 60, 60);
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 882ce7fb853864db48dbcf8295c8db5d
|
||||
guid: 6c37b4a6ff2cd8c4d9080f93cc28d487
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: deab0d46957ab4447a1e1c7c46daf30d
|
||||
guid: 8615ba59806612d4cb7bf7ab4038d2bd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f930d045eaac0425d97a5da4e1360234
|
||||
guid: 9c4ebb22d4276a64e838859ec9e5a127
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -5,7 +5,6 @@ using DG.Tweening;
|
||||
using FGUI.ACommon;
|
||||
using Spine.Unity;
|
||||
using UnityEngine;
|
||||
using FGUI.Common_animal;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
@@ -15,7 +14,7 @@ namespace BingoBrain
|
||||
private FirstRewardModel model;
|
||||
private FGUI.JMain.com_firstreward ui;
|
||||
private Action closeCallback;
|
||||
|
||||
private bool is_get;
|
||||
public FirstRewardUI(FirstRewardUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.FirstRewardUI;
|
||||
@@ -49,11 +48,16 @@ namespace BingoBrain
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
ui.end_point.y += 68;
|
||||
}
|
||||
InitView();
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
//open_sign = (System.Action)args;
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
@@ -75,83 +79,84 @@ namespace BingoBrain
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
SkeletonAnimation sk;
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
ui.end_point.y += Screen.safeArea.y;
|
||||
//ui.money.GetChild("text_gold").text = $"{DataMgr.Coin.Value:N0}";
|
||||
|
||||
}
|
||||
ui.text_num.text = "$" + ConfigSystem.GetConfig<CommonModel>().InitialNum;
|
||||
// (ui.btn_get as btn_tabblue).cont_button.selectedIndex = 1;
|
||||
FX.Instance.SetFx<SkeletonAnimation>(ui.spine_parent, Fx_Type.fx_first_reward, sk =>
|
||||
{
|
||||
SkeletonAnimation cardSpine = sk;
|
||||
NAAVsa.PlayAnim(cardSpine, "newbie_reward_an01", false);
|
||||
ui.text_num.text = GameHelper.Get102Str(ConfigSystem.GetConfig<CommonModel>().InitialNum);
|
||||
|
||||
FX.Instance.SetFx<SkeletonAnimation>(ui.spine_parent, Fx_Type.fx_first_reward, ps =>
|
||||
{
|
||||
// ps.transform.localPosition = new Vector3(0, 195, 0);
|
||||
sk = ps;
|
||||
// NAAVsa.PlayAnim(ske_pot, "edie", true);
|
||||
}, closeCallback);
|
||||
|
||||
NAAVsa.AddCompleteEvent(cardSpine, (sk) =>
|
||||
{
|
||||
NAAVsa.PlayAnim(cardSpine, "newbie_reward_an02", true);
|
||||
ui.btn_getreward.SetClick(() =>
|
||||
{
|
||||
NAAVsa.PlayAnim(cardSpine, "newbie_reward_an03", false);
|
||||
ui.btn_getreward.visible = false;
|
||||
NAAVsa.AddCompleteEvent(cardSpine, (sk) =>
|
||||
{
|
||||
ui.state.selectedIndex = 1;
|
||||
});
|
||||
});
|
||||
});
|
||||
// OnChangeCardFinish(null);
|
||||
}, closeCallback);
|
||||
// sk = FXManager.Instance.SetFx<SkeletonAnimation>(ui.spine_parent, Fx_Type.fx_first_reward, ref closeCallback);
|
||||
sk.state.SetAnimation(0, "newbie_reward_an01", false);
|
||||
|
||||
sk.state.Complete += a =>
|
||||
{
|
||||
sk.state.SetAnimation(0, "newbie_reward_an02", true);
|
||||
ui.btn_getreward.SetClick(() =>
|
||||
{
|
||||
ui.btn_getreward.visible = false;
|
||||
sk.state.SetAnimation(0, "newbie_reward_an03", false);
|
||||
sk.state.Complete += a =>
|
||||
{
|
||||
ui.state.selectedIndex = 1;
|
||||
};
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
ui.btn_get.SetClick(GetReward);
|
||||
ui.btn_close.SetClick(GetReward);
|
||||
|
||||
// sk.state.SetAnimation(0, "newbie_reward_an01", false);
|
||||
// sk.state.Complete += (a) =>
|
||||
// {
|
||||
// sk.state.SetAnimation(0, "newbie_reward_an02", true);
|
||||
// ui.btn_getreward.SetClick(() =>
|
||||
// {
|
||||
// ui.btn_getreward.visible = false;
|
||||
// sk.state.SetAnimation(0, "newbie_reward_an03", false);
|
||||
// sk.state.Complete += (a) =>
|
||||
// {
|
||||
// ui.state.selectedIndex = com_firstreward.State_page;
|
||||
// };
|
||||
// });
|
||||
|
||||
// };
|
||||
// ui.btn_get.SetClick(GetReward);
|
||||
// ui.btn_close.SetClick(GetReward);
|
||||
// ui.money.GetChild("number_text").text = GameHelper.Get101Str(PreferencesMgr.Instance.Currency101);
|
||||
// ui.btn_close.SetClick(GetReward);
|
||||
}
|
||||
private void GetReward()
|
||||
{
|
||||
var startPot = GameHelper.GetUICenterPosition(ui.text_num);
|
||||
var endPos = GameHelper.GetUICenterPosition(ui.end_point);
|
||||
var rewardData = new RewardData
|
||||
{
|
||||
displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange
|
||||
};
|
||||
var rewardSingleData = new Goda(102, ConfigSystem.GetConfig<CommonModel>().InitialNum, RewardOrigin.Play)
|
||||
{
|
||||
startPosition = startPot,
|
||||
endPosition = endPos,
|
||||
if (is_get) return;
|
||||
is_get = true;
|
||||
|
||||
};
|
||||
rewardData.AddReward(rewardSingleData);
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.GetReward, rewardData);
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.FirstRewardUI_Close);
|
||||
PlayerPrefs.SetInt("first_", 1);
|
||||
DOVirtual.DelayedCall(1, () =>
|
||||
|
||||
var start = GameHelper.GetUICenterPosition(ui.img_gold);
|
||||
var end = GameHelper.GetUICenterPosition(ui.end_point);
|
||||
|
||||
int awardNum = ConfigSystem.GetConfig<CommonModel>().InitialNum;
|
||||
|
||||
var rewardData = new RewardData();
|
||||
|
||||
var rewardSingleData = new Goda(102, awardNum, RewardOrigin.AdTask)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.RefreshMakeupData);
|
||||
startPosition = start,
|
||||
endPosition = new Vector2(end.x - 110, end.y - 110)
|
||||
};
|
||||
|
||||
rewardData.AddReward(rewardSingleData);
|
||||
rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
|
||||
rewardData.AddCompleted(success =>
|
||||
{
|
||||
if (success)
|
||||
{
|
||||
GameHelper.AddGoldNumber(50);
|
||||
|
||||
//var startNum = DataMgr.Coin.Value - awardNum;
|
||||
// DOVirtual.Float((float)startNum, (float)DataMgr.Coin.Value, 1,
|
||||
// value => { ui.money.GetChild("text_gold").text = GameHelper.Get101Str((decimal)value); });
|
||||
// SaveData.GetSaveobject().IsGetFirstReward = true;
|
||||
// SaveData.saveDataFunc();
|
||||
PlayerPrefs.SetInt("first_", 1);
|
||||
DOVirtual.DelayedCall(1f, () =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.FirstRewardUI_Close);
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.Update101);
|
||||
});
|
||||
}
|
||||
});
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.GetReward, rewardData);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e157137ac05b8462ba39a193b838620f
|
||||
guid: 9db36bb6630d76146971b4d8d36a0024
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d41a4a0acf914deeaa724f94c2247c0
|
||||
guid: 21efe86f0ac02734e96c5d7aec67f1e2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb91424f051ac4ab7aac89a4d0f29008
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,48 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class GetTaskRewardCtrl : BaseCtrl
|
||||
{
|
||||
public static GetTaskRewardCtrl Instance { get; private set; }
|
||||
|
||||
private GetTaskRewardModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.GetTaskRewardModel) as GetTaskRewardModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87ee97ded9a294cd39e08c80f08dd72d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,48 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class GetTaskRewardModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 读取数据
|
||||
protected override void OnReadData()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 本地存储
|
||||
protected override void WriteLocalStorage()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ecff54cb7d2546328d5e92f9f89abad
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,115 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using FairyGUI;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
using FGUI.G009_video_animal;
|
||||
using DG.Tweening;
|
||||
using Spine.Unity;
|
||||
using System;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class GetTaskRewardUI : BaseUI
|
||||
{
|
||||
private GetTaskRewardUICtrl ctrl;
|
||||
private GetTaskRewardModel model;
|
||||
private FGUI.G009_video_animal.com_gettaskreward ui;
|
||||
|
||||
public GetTaskRewardUI(GetTaskRewardUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.GetTaskRewardUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "G009_video_animal";
|
||||
uiInfo.assetName = "com_gettaskreward";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.GetTaskRewardModel) as GetTaskRewardModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
closeCallback?.Invoke();
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.G009_video_animal.com_gettaskreward;
|
||||
}
|
||||
private Action closeCallback;
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
// var sk = FX.Instance.SetFx<SkeletonAnimation>(baseUI.GetChild("bg_parent") as GGraph, Fx_Type.fx_win, ref closeCallback);
|
||||
// sk.state.SetAnimation(0, "out", true);
|
||||
InitView();
|
||||
Debug.Log(args);
|
||||
|
||||
int number = (int)args;
|
||||
ui.money_text.text = number.ToString();
|
||||
ui.btn_claim.SetClick(() =>
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.GetTaskReward, false);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.GetTaskRewardUI_Close);
|
||||
GameHelper.addInterAdnumber();
|
||||
});
|
||||
ui.btn_adclaim.SetClick(() =>
|
||||
{
|
||||
GameHelper.ShowVideoAd("reward_lobby", isSuccess =>
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.GetTaskReward, true);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.GetTaskRewardUI_Close);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) (ui.btn_adclaim.GetChild("img_saveingpot") as GImage).visible = true;
|
||||
}
|
||||
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68d77870ef81f4afaabf33d1c0470495
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class GetTaskRewardUICtrl : BaseUICtrl
|
||||
{
|
||||
private GetTaskRewardUI ui;
|
||||
private GetTaskRewardModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.GetTaskRewardUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.GetTaskRewardUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.GetTaskRewardModel) as GetTaskRewardModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new GetTaskRewardUI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.Close();
|
||||
}
|
||||
ui = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
public override uint GetOpenUIMsg(string uiName)
|
||||
{
|
||||
return openUIMsg;
|
||||
}
|
||||
public override uint GetCloseUIMsg(string uiName)
|
||||
{
|
||||
return closeUIMsg;
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89cba9dc9d404422291d75698d7fcb60
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 038523bf2241745d39d0b5bcb5a8af4d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,25 +0,0 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class H5Ctrl : BaseCtrl
|
||||
{
|
||||
public static H5Ctrl Instance { get; private set; }
|
||||
|
||||
private H5Model model;
|
||||
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f9608616c65b4096920d24e596a07ea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,24 +0,0 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class H5Model : BaseModel
|
||||
{
|
||||
public decimal show101;
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2242e23fbfc9437daacf20e82d1e594
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,508 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BingoBrain.Core;
|
||||
using BingoBrain.HotFix;
|
||||
using DG.Tweening;
|
||||
using DontConfuse;
|
||||
using FGUI.ACommon;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class H5UI : BaseUI
|
||||
{
|
||||
private H5UICtrl ctrl;
|
||||
private H5Model model;
|
||||
private FGUI.G004_webview.com_webview ui;
|
||||
|
||||
public H5UI(H5UICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.H5UI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
bool isScrolling;
|
||||
|
||||
|
||||
private bool isTimeOut = false;
|
||||
|
||||
|
||||
private decimal scrollOutTime;
|
||||
|
||||
|
||||
private bool isLoadFinish;
|
||||
|
||||
|
||||
private bool isCurrentTaskFinish;
|
||||
|
||||
|
||||
private bool isCurrentTimeTask;
|
||||
|
||||
|
||||
private bool isAddFinger;
|
||||
|
||||
private long openTime;
|
||||
|
||||
private int iconClickCount;
|
||||
|
||||
private int flyClickCount;
|
||||
|
||||
private int flyNeedClickCount = 0;
|
||||
|
||||
private int currentTabIndex;
|
||||
|
||||
private decimal makeupTaskH5NeedTime;
|
||||
|
||||
|
||||
private Tween bubbleMoveTween;
|
||||
|
||||
private List<Vector3> movePointList = new List<Vector3>();
|
||||
//private CountDownKit countDownKit;
|
||||
private int sendH5point = 0;
|
||||
private SaveingPotClass makeupTaskData_saveing;
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "G004_webview";
|
||||
uiInfo.assetName = "com_webview";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = false;
|
||||
uiInfo.isTickUpdate = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.H5Model) as H5Model;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
|
||||
//WebThroughUtil.WebThroughDisable(H5WebThroughType.OnlineH5, ui.btn_icon);
|
||||
//Hall.Instance.SetInH5(false);
|
||||
// StopFly();
|
||||
// countDownKit?.OnDestroy();
|
||||
|
||||
OnStatisticH5Time();
|
||||
|
||||
|
||||
WebviewManager.Instance.setInH5View(false);
|
||||
WebviewManager.Instance.ShowH5View(false);
|
||||
|
||||
// if (GameHelper.is_first_login)
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open);
|
||||
// GameHelper.is_first_login = false;
|
||||
// }
|
||||
}
|
||||
private void OnStatisticH5Time()
|
||||
{
|
||||
var time = GameHelper.GetNowTime() - openTime;
|
||||
PreferencesMgr.Instance.H5StayTime += (int)time;
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.G004_webview.com_webview;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
ui.btn_close.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(SkinInfo.H5UI_Close); });
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
ui.gruop_.y += Screen.safeArea.y;
|
||||
}
|
||||
makeupTaskData_saveing = SaveData.GetSaveobject().saveingpot_history[SaveData.GetSaveobject().saveingpot_history.Count - 1];
|
||||
WebviewManager.Instance.setInH5View(true);
|
||||
WebviewManager.Instance.ShowH5View(true);
|
||||
InitData();
|
||||
InitView();
|
||||
if (!GameHelper.IsGiftSwitch())
|
||||
{
|
||||
ui.com_top.visible = ui.btn_out.visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
openTime = GameHelper.GetNowTime();
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
//UICtrlDispatcher.Instance.AddListener(SkinInfo.MakeupConfirmUI_Close, SetMakeup);
|
||||
GameDispatcher.Instance.AddListener(BingoInfo.RefreshMakeupData, SetMakeup);
|
||||
GameDispatcher.Instance.AddListener(BingoInfo.resetH5progress, resetTime);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
//UICtrlDispatcher.Instance.RemoveListener(UICtrlMsg.MakeupConfirmUI_Close, SetMakeup);
|
||||
GameDispatcher.Instance.RemoveListener(BingoInfo.RefreshMakeupData, SetMakeup);
|
||||
GameDispatcher.Instance.RemoveListener(BingoInfo.resetH5progress, resetTime);
|
||||
}
|
||||
#endregion
|
||||
void resetTime(object a = null)
|
||||
{
|
||||
iconTime = 0;
|
||||
}
|
||||
decimal iconTime = 0;
|
||||
private decimal updateTime;
|
||||
public override void OnUpdate()
|
||||
{
|
||||
if (iconTime < ConfigSystem.GetConfig<CommonModel>().ThroughRewardCD)
|
||||
{
|
||||
iconTime += (decimal)Time.deltaTime;
|
||||
UpdateIcon();
|
||||
}
|
||||
CheckShowFly();
|
||||
|
||||
updateTime += (decimal)Time.deltaTime;
|
||||
|
||||
// if (makeupTaskH5NeedTime > 0 && PreferencesMgr.Instance.MakeupTaskH5Time < makeupTaskH5NeedTime)
|
||||
// {
|
||||
if (updateTime >= 1)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
updateTime = 600;
|
||||
#endif
|
||||
if (PreferencesMgr.Instance.MakeupTaskH5Time > 60 &&
|
||||
((PreferencesMgr.Instance.MakeupTaskH5Time % 60) < 1))
|
||||
{
|
||||
// NetworkKit.BuriedPoint(BuriedPointEvent.h5_event, BuriedPointEvent.h5_event_time, 60);
|
||||
}
|
||||
|
||||
if (sendH5point == 1)
|
||||
{
|
||||
PlayerPrefs.SetInt("sendH5point", 0);
|
||||
sendH5point = 0;
|
||||
}
|
||||
PreferencesMgr.Instance.MakeupTaskH5Time += updateTime;
|
||||
PreferencesMgr.Instance.CoinMakeupTaskH5Time += updateTime;
|
||||
|
||||
if (makeupTaskData_saveing.status == SaveingPotTaskStatus.None)
|
||||
{
|
||||
if (PreferencesMgr.Instance.ExchangeAccount != null)
|
||||
{
|
||||
makeupTaskData_saveing.H5Time += (float)updateTime;
|
||||
}
|
||||
|
||||
}
|
||||
updateTime = 0;
|
||||
|
||||
}
|
||||
// }
|
||||
// else if (makeupTaskH5NeedTime > 0 && PreferencesMgr.Instance.MakeupTaskH5Time >= makeupTaskH5NeedTime)
|
||||
// {
|
||||
// if (sendH5point == 0)
|
||||
// {
|
||||
// NetworkKit.BuriedPoint(BuriedPointEvent.h5_event, BuriedPointEvent.h5_event_numbers, 1);
|
||||
// sendH5point = 1;
|
||||
// PlayerPrefs.SetInt("sendH5point", 1);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
//初始化页面逻辑
|
||||
private void InitData()
|
||||
{
|
||||
|
||||
// model.show101 = PreferencesMgr.Instance.Currency101;
|
||||
flyNeedClickCount = UnityEngine.Random.Range(ConfigSystem.GetConfig<CommonModel>().flyAdTime[0],
|
||||
ConfigSystem.GetConfig<CommonModel>().flyAdTime[1] + 1);
|
||||
//flyNeedClickCount = 5;
|
||||
|
||||
// if (PreferencesMgr.Instance.MakeupTaskHistory.Count > 0)
|
||||
// {
|
||||
// var taskData = PreferencesMgr.Instance.MakeupTaskHistory.Last();
|
||||
// if (taskData != null)
|
||||
// {
|
||||
// Makeup makeupVo = null;
|
||||
// foreach (var makeup in ConfigSystem.GetConfig<MakeupModel>().dataList)
|
||||
// {
|
||||
// if (makeup.id == taskData.tableId)
|
||||
// {
|
||||
// makeupVo = makeup;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
// makeupTaskH5NeedTime = makeupVo.task_need;
|
||||
// }
|
||||
// }
|
||||
|
||||
sendH5point = PlayerPrefs.GetInt("sendH5point", 0);
|
||||
|
||||
|
||||
#if UNITY_EDITOR
|
||||
isLoadFinish = true;
|
||||
#endif
|
||||
}
|
||||
private void InitView()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// InitIcon();
|
||||
// CheckShowFly();
|
||||
// ui.com_fly.SetClick(OnClickFlyCash);
|
||||
// #endif
|
||||
// SetMakeup();
|
||||
|
||||
|
||||
//OnClickIcon();
|
||||
SetMakeup();
|
||||
WebviewManager.Instance.ShowFlyBtn(true);
|
||||
UpdateIcon();
|
||||
OnClickIcon();
|
||||
}
|
||||
|
||||
private void UpdateIcon()
|
||||
{
|
||||
float amount = (float)iconTime / ConfigSystem.GetConfig<CommonModel>().ThroughRewardCD;
|
||||
|
||||
|
||||
WebviewManager.Instance.SetIconProgress(amount);
|
||||
// if (iconTime >= ConfigSystem.GetConfig<CommonModel>().ThroughRewardCD)
|
||||
// {
|
||||
// if (!ui.btn_icon.fx_ready.playing)
|
||||
// {
|
||||
// ui.btn_icon.fx_ready.Play();
|
||||
// }
|
||||
|
||||
// ui.btn_icon.cont_state.selectedIndex = btn_icon.State_ready;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ui.btn_icon.fx_ready.Stop();
|
||||
// }
|
||||
}
|
||||
private void OnClickIcon()
|
||||
{
|
||||
|
||||
|
||||
//WebThroughUtil.WebThroughClick(H5WebThroughType.OnlineH5, ui.btn_icon);
|
||||
|
||||
if (iconTime < ConfigSystem.GetConfig<CommonModel>().ThroughRewardCD)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// WebviewManager.Instance.ShowH5View(false);
|
||||
|
||||
|
||||
|
||||
var rewardData = new RewardData();
|
||||
|
||||
var rewardType = 102;
|
||||
float[] cash_array = GameHelper.GetRewardValue(2);
|
||||
// decimal rewardValue = CardEntity.GetSumToType(CardPropType.cash);
|
||||
|
||||
var rewardSingleData = new Goda(rewardType, (decimal)cash_array[0], RewardOrigin.H5Icon)
|
||||
{
|
||||
startPosition = GameHelper.GetUICenterPosition(ui),
|
||||
endPosition = GameHelper.GetUICenterPosition(ui.com_top.text_num)
|
||||
};
|
||||
rewardData.AddReward(rewardSingleData);
|
||||
rewardData.AddCompleted(isSuccess =>
|
||||
{
|
||||
//ui.btn_icon.cont_state.selectedIndex = btn_icon.State_none;
|
||||
iconTime = 0;
|
||||
SetMakeup();
|
||||
});
|
||||
rewardData.condition = RewardCondition.AD;
|
||||
rewardData.displayType =
|
||||
RewardDisplayType.Dialog | RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
|
||||
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.GetReward, rewardData);
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior, BuriedPointEvent.annular_get_number, 1);
|
||||
}
|
||||
private void CheckShowFly()
|
||||
{
|
||||
var nowTime = GameHelper.GetNowTime();
|
||||
var leftTime = (int)(PreferencesMgr.Instance.AdCashFlyShowTime - nowTime);
|
||||
|
||||
ui.com_fly.visible = false;
|
||||
ui.com_fly.visible = leftTime <= 0;
|
||||
if (leftTime > 0)
|
||||
{
|
||||
WebviewManager.Instance.ShowFlyBtn(false);
|
||||
isFlyShow = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//StartFly();
|
||||
if (!isFlyShow) WebviewManager.Instance.ShowFlyBtn(true);
|
||||
isFlyShow = true;
|
||||
|
||||
}
|
||||
}
|
||||
private bool isFlyShow = false;
|
||||
private void StartFly()
|
||||
{
|
||||
|
||||
|
||||
var bubbleGo = ui.com_fly.displayObject.gameObject;
|
||||
bubbleMoveTween = bubbleGo.transform
|
||||
.DOLocalPath(movePointList.ToArray(), 10)
|
||||
.SetEase(Ease.Linear)
|
||||
.OnComplete(StartFly)
|
||||
.SetAutoKill(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void OnClickFlyCash()
|
||||
{
|
||||
PreferencesMgr.Instance.AdCashFlyShowTime =
|
||||
GameHelper.GetNowTime() + ConfigSystem.GetConfig<CommonModel>().flyCD;
|
||||
var rewardData = new RewardData();
|
||||
|
||||
var singleValue =
|
||||
(decimal)Math.Round(
|
||||
UnityEngine.Random.Range(ConfigSystem.GetConfig<CommonModel>().flyReward[0],
|
||||
ConfigSystem.GetConfig<CommonModel>().flyReward[1]), 2);
|
||||
decimal rewardValue;
|
||||
|
||||
|
||||
if (flyClickCount >= flyNeedClickCount)
|
||||
{
|
||||
flyClickCount = -1;
|
||||
//var rate = GameHelper.GetVideoRate();
|
||||
rewardValue = singleValue;
|
||||
GameHelper.ShowVideoAd("reward_fly", isCompleted =>
|
||||
{
|
||||
if (isCompleted)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.GetReward, rewardData);
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.RefreshMakeupData);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
rewardValue = singleValue;
|
||||
}
|
||||
var rewardSingleData = new Goda(102, rewardValue, RewardOrigin.Play)
|
||||
{
|
||||
startPosition = GameHelper.GetUICenterPosition(ui.com_fly),
|
||||
endPosition = GameHelper.GetUICenterPosition(ui.com_top.text_num)
|
||||
};
|
||||
|
||||
rewardData.AddReward(rewardSingleData);
|
||||
rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
|
||||
rewardData.AddCompleted(isSuccess =>
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
flyClickCount++;
|
||||
}
|
||||
|
||||
SetMakeup();
|
||||
});
|
||||
//PreferencesMgr.Instance.Currency102 += rewardValue;
|
||||
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.GetReward, rewardData);
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.RefreshMakeupData);
|
||||
CheckShowFly();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void Set101(decimal cash = -1)
|
||||
{
|
||||
// if (cash < 0)
|
||||
// {
|
||||
// cash = PreferencesMgr.Instance.Currency102;
|
||||
// }
|
||||
|
||||
// ui.com_top.text_num.text = "$"+ PreferencesMgr.Instance.Currency102;
|
||||
}
|
||||
|
||||
public void OnLoadFinish()
|
||||
{
|
||||
isLoadFinish = true;
|
||||
}
|
||||
|
||||
public void OnLoadH5Progress(int progress)
|
||||
{
|
||||
}
|
||||
|
||||
private void SetMakeup(object a = null)
|
||||
{
|
||||
var com_box = ui.com_top;
|
||||
|
||||
com_box.text_num.text = "$" + PreferencesMgr.Instance.Currency102;
|
||||
Debug.Log("-----------------------"+PreferencesMgr.Instance.Currency102);
|
||||
DOVirtual.Float(0, (float)PreferencesMgr.Instance.Currency102, 0.5f,
|
||||
value => { com_box.text_num.text = "$" + value.ToString("0.00"); });
|
||||
|
||||
|
||||
if (PreferencesMgr.Instance.MakeupTaskHistory.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory.Last();
|
||||
makeup vo = null;
|
||||
|
||||
foreach (makeup item in ConfigSystem.GetConfig<MakeupModel>().dataList)
|
||||
{
|
||||
|
||||
if (item.id == makeupTaskData.tableId) vo = item;
|
||||
}
|
||||
var leftCash = (double)Math.Max(vo.item_need - PreferencesMgr.Instance.Currency102, 0);
|
||||
com_box.text_more.SetVar("money", "$" + leftCash).FlushVars();
|
||||
com_box.pb_num.max = vo.item_need;
|
||||
com_box.pb_num.TweenValue(vo.item_need - leftCash, 0.1f);
|
||||
|
||||
float b = ((float)PreferencesMgr.Instance.Currency102) / vo.item_need;
|
||||
|
||||
ui.btn_out.SetClick(() =>
|
||||
{
|
||||
WebviewManager.Instance.ShowH5View(false);
|
||||
uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
// MainTabUI.getIns().OnGameTab(0);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void ClickBtn(string name)
|
||||
{
|
||||
// // Debug.Log("[UNITY] Click btn: " + name);
|
||||
// FGUIHelper.PlayClickSound();
|
||||
if (name == "flyBtn")
|
||||
{
|
||||
OnClickFlyCash();
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior, BuriedPointEvent.collect_fly_number, 1);
|
||||
//NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior,BuriedPointEvent.collect_fly_people,1);
|
||||
}
|
||||
else if (name == "rewardBtn")
|
||||
{
|
||||
OnClickIcon();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 499f47a2060dd4d19acc3e32bc4c693e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,99 +0,0 @@
|
||||
|
||||
using BingoBrain.Core;
|
||||
using BingoBrain.HotFix;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class H5UICtrl : BaseUICtrl
|
||||
{
|
||||
private H5UI ui;
|
||||
private H5Model model;
|
||||
|
||||
private uint openUIMsg = SkinInfo.H5UI_Open;
|
||||
private uint closeUIMsg = SkinInfo.H5UI_Close;
|
||||
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new H5UI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.Close();
|
||||
}
|
||||
|
||||
ui = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
|
||||
public override uint GetOpenUIMsg(string uiName)
|
||||
{
|
||||
return openUIMsg;
|
||||
}
|
||||
|
||||
public override uint GetCloseUIMsg(string uiName)
|
||||
{
|
||||
return closeUIMsg;
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
uiCtrlDispatcher.AddListener(SkinInfo.MainTabUI_Display, OnMainTabUI_Display);
|
||||
gameDispatcher.AddListener(BingoInfo.H5ViewClickBtn, OnH5ClickBtn);
|
||||
|
||||
}
|
||||
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
uiCtrlDispatcher.RemoveListener(SkinInfo.MainTabUI_Display, OnMainTabUI_Display);
|
||||
gameDispatcher.RemoveListener(BingoInfo.H5ViewClickBtn, OnH5ClickBtn);
|
||||
}
|
||||
|
||||
#endregion
|
||||
void OnH5ClickBtn(object arg)
|
||||
{
|
||||
Debug.Log("feixingqidianjiiiiiiiiiiiiiiiii0");
|
||||
ui?.ClickBtn((string)arg);
|
||||
}
|
||||
|
||||
private void OnMainTabUI_Display(object obj)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
var isShow = (bool)obj;
|
||||
if (isShow)
|
||||
{
|
||||
ui?.Display();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui?.Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 36ad7c57a1662439d94041f3e576ea21
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -71,8 +71,10 @@ namespace BingoBrain
|
||||
private void SetRedeemCard(com_mall_carditem item, int count, int consume, Action<bool> action = null)
|
||||
{
|
||||
item.text_count.SetVar("count", count.ToString()).FlushVars();
|
||||
item.text_number.text = consume.ToString();
|
||||
item.btn_redeem.SetClick(() =>
|
||||
|
||||
item.btn_redeem_coin.title = consume.ToString();
|
||||
item.btn_redeem_coin.type.selectedIndex = 1;
|
||||
item.btn_redeem_coin.SetClick(() =>
|
||||
{
|
||||
TuSystem.Consume(102, consume, isSuccess =>
|
||||
{
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace BingoBrain
|
||||
{
|
||||
var aRichTextField = new GTextField();
|
||||
aRichTextField.SetSize(GRoot.inst.width, 100);
|
||||
aRichTextField.color = new Color32(81, 81, 81,1);
|
||||
aRichTextField.color = new Color32(19,136,198,1);
|
||||
|
||||
|
||||
aRichTextField.textFormat.size = 38;
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 08c524904680c4f658fd1487b482dbc3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,48 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class LevelSuccessCtrl : BaseCtrl
|
||||
{
|
||||
public static LevelSuccessCtrl Instance { get; private set; }
|
||||
|
||||
private LevelSuccessModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.LevelSuccessModel) as LevelSuccessModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf30effd1c1cf4ee7965a785597ebb5a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,48 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class LevelSuccessModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 读取数据
|
||||
protected override void OnReadData()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 本地存储
|
||||
protected override void WriteLocalStorage()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a82cc7895b244916bf94ffb2678b292
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,647 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using FairyGUI;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
using FGUI.G008_reward_animal;
|
||||
using DG.Tweening;
|
||||
using FGUI.Common_animal;
|
||||
using Newtonsoft.Json;
|
||||
using System.Linq;
|
||||
|
||||
using FGUI.G003_play_animal;
|
||||
using System;
|
||||
using Spine.Unity;
|
||||
using BingoBrain.HotFix;
|
||||
using DontConfuse;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class LevelSuccessUI : BaseUI
|
||||
{
|
||||
private LevelSuccessUICtrl ctrl;
|
||||
private LevelSuccessModel model;
|
||||
private FGUI.G008_reward_animal.com_lvsuccess ui;
|
||||
private bool is_success;
|
||||
private bool is_level_success;
|
||||
private bool is_h5_reward;
|
||||
public static bool aftershow_success = false;//用于在倒数第二个奖励是钞票是关卡结束奖励弹不出来
|
||||
private SuccessData success_data;
|
||||
|
||||
public LevelSuccessUI(LevelSuccessUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.LevelSuccessUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "G008_reward_animal";
|
||||
uiInfo.assetName = "com_lvsuccess";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.LevelSuccessModel) as LevelSuccessModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
GameHelper.SetCloseResult(false);
|
||||
|
||||
closeCallback?.Invoke();
|
||||
//if (is_level_success && !GameHelper.is_first_login) UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open, is_success);
|
||||
if (is_h5_reward)
|
||||
{
|
||||
WebviewManager.Instance.ShowH5View(true);
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.resetH5progress);
|
||||
}
|
||||
// if (UI.Instance.IsExistUI(UIConst.H5UI))
|
||||
// {
|
||||
// WebviewManager.Instance.SetDarkThough(true);
|
||||
|
||||
// }
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
if (aftershow_success)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.checkGameState);
|
||||
aftershow_success = false;
|
||||
}
|
||||
}
|
||||
private Action closeCallback;
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.G008_reward_animal.com_lvsuccess;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object arg)
|
||||
{
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) (ui.btn_adclaim.GetChild("img_saveingpot") as GImage).visible = true;
|
||||
if (UI.Instance.IsExistUI(UIConst.H5UI))
|
||||
{
|
||||
WebviewManager.Instance.SetDarkThough(false);
|
||||
WebviewManager.Instance.ShowH5View(false);
|
||||
}
|
||||
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
ui.gold.y += Screen.safeArea.y;
|
||||
ui.top_money.y += Screen.safeArea.y;
|
||||
ui.tips_bg.y += Screen.safeArea.y;
|
||||
ui.tips_text.y += Screen.safeArea.y;
|
||||
}
|
||||
|
||||
SuccessData args = arg as SuccessData;
|
||||
success_data = args;
|
||||
|
||||
is_level_success = args.IsLevelSuccess;
|
||||
is_h5_reward = args.IsH5Reward;
|
||||
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
ui.switchgift.selectedIndex = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.switchgift.selectedIndex = 0;
|
||||
}
|
||||
|
||||
if (is_level_success && !is_h5_reward) {
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Open);
|
||||
|
||||
GameHelper.PlayGameTimeEvent(1, () => {
|
||||
GameHelper.RequestGameConfig();
|
||||
});
|
||||
} else {
|
||||
GameHelper.SetCloseResult(true);
|
||||
}
|
||||
|
||||
|
||||
Debug.Log(args);
|
||||
is_success = args.IsWin;
|
||||
if (is_success)
|
||||
{
|
||||
if (Audio.Instance.IsOpenEffect)
|
||||
{
|
||||
Audio.Instance.PlayDynamicEffect("Victoriously");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (is_success) ui.state.selectedIndex = 0;
|
||||
else ui.state.selectedIndex = 1;
|
||||
ui.level_text.text = "Level " + GameHelper.GetLevel();
|
||||
(ui.btn_adclaim as btn_tabad).color.selectedIndex = 1;
|
||||
ui.btn_restart.SetClick(() =>
|
||||
{
|
||||
if (!GameHelper.GetCloseResult()) return;
|
||||
|
||||
GameHelper.addInterAdnumber();
|
||||
if (!is_success)
|
||||
{
|
||||
GameHelper.SetLevelstate(3);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.sendLog, false);
|
||||
}
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open, is_success);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Close);
|
||||
|
||||
});
|
||||
ui.top_money.GetChild("number_text").text = "$" + PreferencesMgr.Instance.Currency102;
|
||||
float cash_number = args.cash_number;
|
||||
int rate = 1;
|
||||
if (is_success)
|
||||
{
|
||||
rate = args.rate;
|
||||
ui.btn_adclaim.GetChild("title").text = "Claim X" + rate;
|
||||
// var sk = FX.Instance.SetFx<SkeletonAnimation>(baseUI.GetChild("bg_parent") as GGraph, Fx_Type.fx_win, ref closeCallback);
|
||||
// sk.state.SetAnimation(0, "out", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.bg_parent.y += 200;
|
||||
// var sk = FX.Instance.SetFx<SkeletonAnimation>(ui.bg_parent, Fx_Type.fx_lose, ref closeCallback);
|
||||
// sk.state.SetAnimation(0, "animation", true);
|
||||
}
|
||||
|
||||
|
||||
InitView();
|
||||
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
if (is_success) ui.money_text.text = "$" + cash_number.ToString("0.00");
|
||||
else
|
||||
{
|
||||
ui.money_text.text = "$" + PreferencesMgr.Instance.Currency102;
|
||||
ui.top_money.visible = false;
|
||||
}
|
||||
|
||||
ui.btn_adclaim.SetClick(() =>
|
||||
{
|
||||
if (!GameHelper.GetCloseResult()) return;
|
||||
|
||||
GameHelper.ShowVideoAd("reward_lobby", isSuccess =>
|
||||
{
|
||||
if (isSuccess)
|
||||
|
||||
{
|
||||
ui.btn_claim.SetClick(() => { });
|
||||
ui.btn_adclaim.SetClick(() => { });
|
||||
ui.top_money.GetChild("btn_cashout").SetClick(() => { });
|
||||
ui.com_cash.btn_cash.SetClick(() => { });
|
||||
var start = GameHelper.GetUICenterPosition(ui.btn_adclaim);
|
||||
var end = GameHelper.GetUICenterPosition(ui.top_money.GetChild("number_text"));
|
||||
|
||||
var rewardData = new RewardData
|
||||
{
|
||||
displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange
|
||||
};
|
||||
var rewardSingleData = new Goda(102, (decimal)cash_number * rate, RewardOrigin.Play)
|
||||
{
|
||||
startPosition = start,
|
||||
endPosition = end,
|
||||
|
||||
};
|
||||
|
||||
rewardData.AddReward(rewardSingleData);
|
||||
rewardData.AddCompleted(success =>
|
||||
{
|
||||
if (success)
|
||||
{
|
||||
// RefreshGold((decimal)awardNum);
|
||||
|
||||
DOVirtual.DelayedCall(0.3f, () =>
|
||||
{
|
||||
CtrlCloseUI();
|
||||
if (is_level_success) UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open, true);
|
||||
});
|
||||
}
|
||||
});
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.GetReward, rewardData);
|
||||
DOVirtual.DelayedCall(1, () =>
|
||||
{
|
||||
DOVirtual.Float(0, (float)PreferencesMgr.Instance.Currency102, 1f,
|
||||
value => { (ui.top_money.GetChild("number_text") as GTextField).text = "$" + value.ToString("0.00"); });
|
||||
});
|
||||
|
||||
DOVirtual.DelayedCall(2f, () =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Close);
|
||||
});
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData);
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.RefreshMakeupData);
|
||||
}
|
||||
});
|
||||
});
|
||||
ui.btn_claim.SetClick(() =>
|
||||
{
|
||||
if (!GameHelper.GetCloseResult()) return;
|
||||
|
||||
ui.btn_claim.SetClick(() => { });
|
||||
ui.btn_adclaim.SetClick(() => { });
|
||||
ui.top_money.GetChild("btn_cashout").SetClick(() => { });
|
||||
ui.com_cash.btn_cash.SetClick(() => { });
|
||||
var start = GameHelper.GetUICenterPosition(ui.btn_claim);
|
||||
var end = GameHelper.GetUICenterPosition(ui.top_money.GetChild("number_text"));
|
||||
|
||||
|
||||
// reward_data temp = new reward_data() { start = start, end = end, change = cash_number, type = 111 };
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.CoinWnd_newUI_Open, temp);
|
||||
// GameHelper.addMoney(cash_number);
|
||||
|
||||
var rewardData = new RewardData
|
||||
{
|
||||
displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange
|
||||
};
|
||||
var rewardSingleData = new Goda(102, (decimal)cash_number, RewardOrigin.Play)
|
||||
{
|
||||
startPosition = start,
|
||||
endPosition = end,
|
||||
|
||||
};
|
||||
rewardData.AddReward(rewardSingleData);
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.GetReward, rewardData);
|
||||
rewardData.AddCompleted(success =>
|
||||
{
|
||||
if (success)
|
||||
{
|
||||
// RefreshGold((decimal)awardNum);
|
||||
|
||||
DOVirtual.DelayedCall(0.3f, () =>
|
||||
{
|
||||
CtrlCloseUI();
|
||||
if (is_level_success) UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open, true);
|
||||
});
|
||||
}
|
||||
});
|
||||
DOVirtual.DelayedCall(1, () =>
|
||||
{
|
||||
DOVirtual.Float(0, (float)PreferencesMgr.Instance.Currency102, 1f,
|
||||
value => { (ui.top_money.GetChild("number_text") as GTextField).text = "$" + value.ToString("0.00"); });
|
||||
});
|
||||
|
||||
DOVirtual.DelayedCall(2f, () =>
|
||||
{
|
||||
GameHelper.addInterAdnumber();
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Close);
|
||||
|
||||
});
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData);
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.RefreshMakeupData);
|
||||
|
||||
});
|
||||
|
||||
//int name_index = UnityEngine.Random.Range(0, ConfigSystem.GetConfig<exBrPoolModel>().config_name_list.Count);
|
||||
var name_index = UnityEngine.Random.Range(0, exBrPoolModel.config_name_list.Count);
|
||||
var money_index = UnityEngine.Random.Range(0, exBrPoolModel.config_money_list.Count);
|
||||
|
||||
System.DateTime oldtime = System.DateTime.Now.AddSeconds(-UnityEngine.Random.Range(1 * 3600, 2 * 3600));
|
||||
|
||||
ui.com_cash.broad.cast_text.text = string.Format("Congratulations, [color=#e3a13a]{0}[/color] withdrew [color=#83c93c]{1} [/color]dollars", exBrPoolModel.config_name_list[name_index],
|
||||
exBrPoolModel.config_money_list[money_index]);
|
||||
|
||||
var makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory.Last();
|
||||
var vo = ConfigSystem.GetConfig<MakeupModel>().GetData(makeupTaskData.tableId);
|
||||
|
||||
ui.com_cash.btn_cash.SetClick(() =>
|
||||
{
|
||||
if (!GameHelper.GetCloseResult()) return;
|
||||
|
||||
ui.btn_claim.SetClick(() => { });
|
||||
ui.btn_adclaim.SetClick(() => { });
|
||||
ui.top_money.GetChild("btn_cashout").SetClick(() => { });
|
||||
ui.com_cash.btn_cash.SetClick(() => { });
|
||||
if (is_success)
|
||||
{
|
||||
var start = GameHelper.GetUICenterPosition(ui.btn_claim);
|
||||
var end = GameHelper.GetUICenterPosition(ui.top_money.GetChild("number_text"));
|
||||
var rewardData = new RewardData
|
||||
{
|
||||
displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange
|
||||
};
|
||||
var rewardSingleData = new Goda(102, (decimal)cash_number, RewardOrigin.Play)
|
||||
{
|
||||
startPosition = start,
|
||||
endPosition = end,
|
||||
|
||||
};
|
||||
rewardData.AddReward(rewardSingleData);
|
||||
rewardData.AddCompleted(success =>
|
||||
{
|
||||
if (success)
|
||||
{
|
||||
// RefreshGold((decimal)awardNum);
|
||||
|
||||
DOVirtual.DelayedCall(0.3f, () =>
|
||||
{
|
||||
CtrlCloseUI();
|
||||
if (is_level_success) UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open, true);
|
||||
});
|
||||
}
|
||||
});
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.GetReward, rewardData);
|
||||
DOVirtual.DelayedCall(1, () =>
|
||||
{
|
||||
DOVirtual.Float(0, (float)PreferencesMgr.Instance.Currency102, 1f,
|
||||
value => { (ui.top_money.GetChild("number_text") as GTextField).text = "$" + value.ToString("0.00"); });
|
||||
});
|
||||
|
||||
DOVirtual.DelayedCall(1.0f, () =>
|
||||
{
|
||||
uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Close);
|
||||
GameHelper.addInterAdnumber();
|
||||
|
||||
});
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData);
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.RefreshMakeupData);
|
||||
}
|
||||
else
|
||||
{
|
||||
uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Close);
|
||||
GameHelper.addInterAdnumber();
|
||||
}
|
||||
if (is_level_success && !is_success) UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open, true);
|
||||
|
||||
});
|
||||
|
||||
ui.top_money.GetChild("btn_cashout").SetClick(() =>
|
||||
{
|
||||
if (!GameHelper.GetCloseResult()) return;
|
||||
|
||||
ui.btn_claim.SetClick(() => { });
|
||||
ui.btn_adclaim.SetClick(() => { });
|
||||
ui.top_money.GetChild("btn_cashout").SetClick(() => { });
|
||||
ui.com_cash.btn_cash.SetClick(() => { });
|
||||
if (is_success)
|
||||
{
|
||||
var start = GameHelper.GetUICenterPosition(ui.btn_claim);
|
||||
var end = GameHelper.GetUICenterPosition(ui.top_money.GetChild("number_text"));
|
||||
var rewardData = new RewardData
|
||||
{
|
||||
displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange
|
||||
};
|
||||
var rewardSingleData = new Goda(102, (decimal)cash_number, RewardOrigin.Play)
|
||||
{
|
||||
startPosition = start,
|
||||
endPosition = end,
|
||||
|
||||
};
|
||||
rewardData.AddReward(rewardSingleData);
|
||||
rewardData.AddCompleted(success =>
|
||||
{
|
||||
|
||||
if (success)
|
||||
{
|
||||
// RefreshGold((decimal)awardNum);
|
||||
|
||||
DOVirtual.DelayedCall(0.3f, () =>
|
||||
{
|
||||
CtrlCloseUI();
|
||||
Debug.Log("66666666666666666666662"); if (is_level_success) UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open, true);
|
||||
});
|
||||
}
|
||||
});
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.GetReward, rewardData);
|
||||
DOVirtual.DelayedCall(1, () =>
|
||||
{
|
||||
DOVirtual.Float(0, (float)PreferencesMgr.Instance.Currency102, 1f,
|
||||
value => { (ui.top_money.GetChild("number_text") as GTextField).text = "$" + value.ToString("0.00"); });
|
||||
});
|
||||
|
||||
DOVirtual.DelayedCall(1.0f, () =>
|
||||
{
|
||||
|
||||
uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Close);
|
||||
GameHelper.addInterAdnumber();
|
||||
|
||||
});
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData);
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.RefreshMakeupData);
|
||||
}
|
||||
else
|
||||
{
|
||||
uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Close);
|
||||
GameHelper.addInterAdnumber();
|
||||
}
|
||||
if (is_level_success && !is_success) UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open, true);
|
||||
|
||||
});
|
||||
|
||||
Debug.Log(JsonConvert.SerializeObject(vo));
|
||||
if (GameHelper.GetLevel() <= vo.levels_need)
|
||||
{
|
||||
ui.com_cash.cash_text.text = "Withdrawals can be made through level " + vo.levels_need;
|
||||
ui.com_cash.progress.width = 676f * (GameHelper.GetLevel() - 1) / vo.levels_need;
|
||||
ui.com_cash.progress_text.text = (GameHelper.GetLevel() - 1) + "/" + vo.levels_need;
|
||||
}
|
||||
else if ((float)PreferencesMgr.Instance.Currency102 < vo.item_need)
|
||||
{
|
||||
ui.com_cash.cash_text.text = "Collect " + vo.item_need + " to cash out";
|
||||
if ((float)PreferencesMgr.Instance.Currency102 > vo.item_need)
|
||||
{
|
||||
ui.com_cash.progress.width = 676;
|
||||
ui.com_cash.progress_text.text = "$" + vo.item_need + "/" + "$" + vo.item_need;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.com_cash.progress.width = 676 * ((float)PreferencesMgr.Instance.Currency102 / vo.item_need);
|
||||
ui.com_cash.progress_text.text = "$" + PreferencesMgr.Instance.Currency102 + "/" + "$" + vo.item_need;
|
||||
}
|
||||
|
||||
Debug.Log((float)PreferencesMgr.Instance.Currency102);
|
||||
}
|
||||
else if ((float)PreferencesMgr.Instance.MakeupTaskH5Time < vo.task_need)
|
||||
{
|
||||
ui.com_cash.cash_text.text = "Cumulataive " + (vo.task_need / 60) + @" minutes in ""Hall"" to cash out";
|
||||
if ((float)PreferencesMgr.Instance.MakeupTaskH5Time > vo.task_need)
|
||||
{
|
||||
ui.com_cash.progress.width = 676;
|
||||
ui.com_cash.progress_text.text = (vo.task_need / 60) + "/" + (vo.task_need / 60);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.com_cash.progress.width = 676 * ((float)PreferencesMgr.Instance.MakeupTaskH5Time / vo.task_need);
|
||||
ui.com_cash.progress_text.text = Math.Round(((float)(PreferencesMgr.Instance.MakeupTaskH5Time / 60)), 2) + "/" + (vo.task_need / 60);
|
||||
}
|
||||
|
||||
}
|
||||
else if (makeupTaskData.videoCount < vo.ad_need)
|
||||
{
|
||||
|
||||
ui.com_cash.cash_text.text = "Watch " + vo.ad_need + " Reward Ads to cash out";
|
||||
if (makeupTaskData.videoCount > vo.ad_need)
|
||||
{
|
||||
ui.com_cash.progress.width = 676;
|
||||
ui.com_cash.progress_text.text = vo.ad_need + "/" + vo.ad_need;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.com_cash.progress.width = 676 * ((float)makeupTaskData.videoCount / vo.ad_need);
|
||||
ui.com_cash.progress_text.text = makeupTaskData.videoCount + "/" + vo.ad_need;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.com_cash.cash_text.text = "Watch " + vo.ad_need + " Reward Ads to cash out";
|
||||
if (makeupTaskData.videoCount > vo.ad_need)
|
||||
{
|
||||
ui.com_cash.progress.width = 676;
|
||||
ui.com_cash.progress_text.text = vo.ad_need + "/" + vo.ad_need;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.com_cash.progress.width = 676 * ((float)makeupTaskData.videoCount / vo.ad_need);
|
||||
ui.com_cash.progress_text.text = makeupTaskData.videoCount + "/" + vo.ad_need;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// ui.money_text.text = "20";
|
||||
// ui.gold.GetChild("number_text").text = GameHelper.GetGoldNumber().ToString();
|
||||
// ui.btn_adclaim.GetChild("title").text = "Claim X2";
|
||||
// ui.btn_adclaim.SetClick(() =>
|
||||
// {
|
||||
// GameHelper.ShowVideoAd("reward_lobby", isSuccess =>
|
||||
// {
|
||||
// if (isSuccess)
|
||||
|
||||
// {
|
||||
// ui.btn_claim.SetClick(() => { });
|
||||
// ui.btn_adclaim.SetClick(() => { });
|
||||
// var start = GameHelper.GetUICenterPosition(ui.btn_adclaim);
|
||||
// var end = GameHelper.GetUICenterPosition(ui.gold.GetChild("number_text"));
|
||||
|
||||
// reward_data temp = new reward_data() { start = start, end = end, change = 40, type = 101 };
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.CoinWnd_newUI_Open, temp);
|
||||
// GameHelper.addGoldNumber(40);
|
||||
// DOVirtual.DelayedCall(1, () =>
|
||||
// {
|
||||
// DOVirtual.Float(0, GameHelper.getGoldNumber(), 1,
|
||||
// value => { ui.gold.GetChild("number_text").text = ((int)value).ToString(); });
|
||||
// }
|
||||
// );
|
||||
|
||||
// DOVirtual.DelayedCall(2f, () =>
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Close);
|
||||
// });
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// ui.btn_claim.SetClick(() =>
|
||||
// {
|
||||
// ui.btn_claim.SetClick(() => { });
|
||||
// ui.btn_adclaim.SetClick(() => { });
|
||||
// var start = GameHelper.GetUICenterPosition(ui.btn_claim);
|
||||
// var end = GameHelper.GetUICenterPosition(ui.gold.GetChild("number_text"));
|
||||
// // var reward = GameHelper.GetQuizRewardValue();
|
||||
// // var rewardData = new RewardData();
|
||||
// // var rewardSingleData = new RewardSingleData(111, (decimal)reward, RewardOrigin.GameWin)
|
||||
// // {
|
||||
// // startPosition = start,
|
||||
// // endPosition = end
|
||||
// // };
|
||||
// // rewardData.AddReward(rewardSingleData);
|
||||
|
||||
// // //rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
|
||||
// // rewardData.displayType = RewardDisplayType.RewardFly ;
|
||||
// //GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
|
||||
// reward_data temp = new reward_data() { start = start, end = end, change = 20, type = 101 };
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.CoinWnd_newUI_Open, temp);
|
||||
// GameHelper.addGoldNumber(20);
|
||||
// DOVirtual.DelayedCall(1, () =>
|
||||
// {
|
||||
// DOVirtual.Float(0, GameHelper.getGoldNumber(), 1,
|
||||
// value => { ui.gold.GetChild("number_text").text = ((int)value).ToString(); });
|
||||
// }
|
||||
// );
|
||||
|
||||
// DOVirtual.DelayedCall(2f, () =>
|
||||
// {
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Close);
|
||||
// });
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
|
||||
// });
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
private int time_count = 0;
|
||||
|
||||
void timeEvent()
|
||||
{
|
||||
time_count++;
|
||||
|
||||
if (time_count > 3)
|
||||
{
|
||||
time_count = 0;
|
||||
ui.com_cash.broad.t0.Play(() =>
|
||||
{
|
||||
var name_index = UnityEngine.Random.Range(0, exBrPoolModel.config_name_list.Count);
|
||||
var money_index = UnityEngine.Random.Range(0, exBrPoolModel.config_money_list.Count);
|
||||
|
||||
|
||||
|
||||
|
||||
System.DateTime oldtime = System.DateTime.Now.AddSeconds(-UnityEngine.Random.Range(1 * 3600, 2 * 3600));
|
||||
ui.com_cash.broad.cast_text.text = string.Format("Congratulations, [color=#e3a13a]{0}[/color] withdrew [color=#83c93c]{1} [/color]dollars ", exBrPoolModel.config_name_list[name_index],
|
||||
exBrPoolModel.config_money_list[money_index]);
|
||||
//, oldtime.Hour + ":" + (oldtime.Minute > 10 ? oldtime.Minute : "0" + oldtime.Minute)
|
||||
ui.com_cash.broad.t1.Play();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
Hall.Instance.UpdateSecondEvent += timeEvent;
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
Hall.Instance.UpdateSecondEvent -= timeEvent;
|
||||
}
|
||||
#endregion
|
||||
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd55f74e693624c269d3d70e211b2e6a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BingoBrain.Core;
|
||||
|
||||
using BingoBrain;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class LevelSuccessUICtrl : BaseUICtrl
|
||||
{
|
||||
private LevelSuccessUI ui;
|
||||
private LevelSuccessModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.LevelSuccessUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.LevelSuccessUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.LevelSuccessModel) as LevelSuccessModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new LevelSuccessUI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.Close();
|
||||
}
|
||||
ui = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
public override uint GetOpenUIMsg(string uiName)
|
||||
{
|
||||
return openUIMsg;
|
||||
}
|
||||
public override uint GetCloseUIMsg(string uiName)
|
||||
{
|
||||
return closeUIMsg;
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e11350d8494e4786a5913ed38689cbc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7df703f2b68e14715b2d8258520ff908
|
||||
guid: c88dc545c836423438690ea89702f985
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 638ec0e8082454320b04693cd0b44117
|
||||
guid: 992ca3a050715ff49b56b6eab3472028
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6495cd610cfb48a2acc72f826d7f84c
|
||||
guid: 950aecd0ab2e25940a45cfc16de3c1ce
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 07a6491e9479e4ca1a2043fd65945f4d
|
||||
guid: 279f68dd0122f1140b46914e6d166617
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a6e16171811884e098bb5ce34879cc1e
|
||||
guid: b35458b519a76474ba76f69f4da2f3de
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55fd662a0ff8340f28be8613965929f7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,25 +0,0 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class MakeupRecordCtrl : BaseCtrl
|
||||
{
|
||||
public static MakeupRecordCtrl Instance { get; private set; }
|
||||
|
||||
private MakeupRecordModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.MakeupRecordModel) as MakeupRecordModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b65045affd42415ab8ab3bbdda76236
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,23 +0,0 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class MakeupRecordModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d09064f5b33fd46c4ab0176d4d94b807
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,141 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BingoBrain.Core;
|
||||
using BingoBrain.HotFix;
|
||||
using DG.Tweening;
|
||||
using FairyGUI;
|
||||
using FGUI.ACommon;
|
||||
using FGUI.G007_makeup;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class MakeupRecordUI : BaseUI
|
||||
{
|
||||
private MakeupRecordUICtrl ctrl;
|
||||
private MakeupRecordModel model;
|
||||
private FGUI.G007_makeup.com_record ui;
|
||||
private long userUid;
|
||||
private int curIndex = 0;
|
||||
public int ad_cool_down = 120;
|
||||
public MakeupRecordUI(MakeupRecordUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.MakeupRecordUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "G007_makeup";
|
||||
uiInfo.assetName = "com_record";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.G007_makeup.com_record; ;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
|
||||
InitView();
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private List<MakeupTaskData> makeupdataList = new List<MakeupTaskData>();
|
||||
|
||||
|
||||
private void InitView()
|
||||
{
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
ui.group_.y += Screen.safeArea.y;
|
||||
}
|
||||
makeupdataList.Clear();
|
||||
|
||||
foreach (var makeupTaskData in PreferencesMgr.Instance.MakeupTaskHistory)
|
||||
{
|
||||
if (makeupTaskData.status != MakeupTaskStatus.Inline)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
makeupdataList.Add(makeupTaskData);
|
||||
}
|
||||
|
||||
if (makeupdataList.Count == 0)
|
||||
{
|
||||
ui.cont_show.selectedIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.cont_show.selectedIndex = 1;
|
||||
ui.list_record.itemRenderer = ItemRenderer;
|
||||
ui.list_record.numItems = makeupdataList.Count;
|
||||
}
|
||||
|
||||
ui.closeButton.SetClick(CtrlCloseUI);
|
||||
ui.btn_help.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(SkinInfo.RegulationUI_Open); });
|
||||
}
|
||||
|
||||
private void ItemRenderer(int index, GObject gObject)
|
||||
{
|
||||
var data = makeupdataList[index];
|
||||
var item = gObject as com_cord_new;
|
||||
// TextureHelper.GetCardIcon(true, spr => { item.loader_logo.texture = spr; });
|
||||
// item.text_name.SetVar("cur", data.inlineNum.ToString()).SetVar("tol", data.inlineInitNum.ToString())
|
||||
// .FlushVars();
|
||||
item.text_amt.text = "+$" + (int)data.amount;
|
||||
item.email_text.text = PreferencesMgr.Instance.ExchangeAccount;
|
||||
item.number_text.text = data.inlineNum + "/" + data.inlineInitNum;
|
||||
item.time_text.text = DateTimeBoardk.Instance.TimestampToString(data.order_time);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf41d32681a204da480746eb6b5fb99f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,74 +0,0 @@
|
||||
using BingoBrain.Core;
|
||||
using BingoBrain.HotFix;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class MakeupRecordUICtrl : BaseUICtrl
|
||||
{
|
||||
private MakeupRecordUI ui;
|
||||
private MakeupRecordModel model;
|
||||
|
||||
private uint openUIMsg = SkinInfo.MakeupRecordUI_Open;
|
||||
private uint closeUIMsg = SkinInfo.MakeupRecordUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.MakeupRecordModel) as MakeupRecordModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new MakeupRecordUI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.Close();
|
||||
}
|
||||
ui = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
public override uint GetOpenUIMsg(string uiName)
|
||||
{
|
||||
return openUIMsg;
|
||||
}
|
||||
public override uint GetCloseUIMsg(string uiName)
|
||||
{
|
||||
return closeUIMsg;
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: adcebff8c69334963bf0fa7f9ccb627e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c499afc5fe924577b59355d82f0747a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,25 +0,0 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class MakeupStepCtrl : BaseCtrl
|
||||
{
|
||||
public static MakeupStepCtrl Instance { get; private set; }
|
||||
|
||||
private MakeupStepModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst. MakeupStepModel) as MakeupStepModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ffbbf7d0d1834f888ab3750e79153d1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,23 +0,0 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class MakeupStepModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1283be4fac27d4279bf8634f23646589
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,144 +0,0 @@
|
||||
using BingoBrain.Core;
|
||||
using BingoBrain.HotFix;
|
||||
using FGUI.ACommon;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class MakeupStepUI : BaseUI
|
||||
{
|
||||
private MakeupStepUICtrl ctrl;
|
||||
private MakeupStepModel model;
|
||||
private FGUI.G007_makeup.com_step ui;
|
||||
private MakeupTaskData makeupTaskData;
|
||||
public MakeupStepUI(MakeupStepUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.MakeupStepUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "G007_makeup";
|
||||
uiInfo.assetName = "com_step";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst. MakeupStepModel) as MakeupStepModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.G007_makeup.com_step;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
makeupTaskData = args as MakeupTaskData;
|
||||
Debug.Log(JsonConvert.SerializeObject(makeupTaskData));
|
||||
InitView();
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void InitView()
|
||||
{
|
||||
if (makeupTaskData == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ui.com_info.text_name.text = PreferencesMgr.Instance.ExchangeName;
|
||||
ui.com_info.text_email.text = PreferencesMgr.Instance.ExchangeAccount;
|
||||
|
||||
ui.com_info.btn_change.SetClick(() =>
|
||||
{
|
||||
PreferencesMgr.Instance.ExchangeName = null;
|
||||
PreferencesMgr.Instance.ExchangeAccount = null;
|
||||
uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
CtrlCloseUI();
|
||||
});
|
||||
|
||||
ui.btn_confirm.touchable = false;
|
||||
GameHelper.PlayFGUIFx(ui.fx_in, true, () => { ui.btn_confirm.touchable = true; });
|
||||
|
||||
ui.btn_confirm.SetClick(() =>
|
||||
{
|
||||
var info = new
|
||||
{
|
||||
email = PreferencesMgr.Instance.ExchangeAccount,
|
||||
first_name = PreferencesMgr.Instance.short_name,
|
||||
last_name = PreferencesMgr.Instance.long_name
|
||||
};
|
||||
NetworkKit.PostWithHeader("shop/payOutUserInfo", info);
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.withdraw_behavior, BuriedPointEvent.withdraw_message, 1);
|
||||
uiCtrlDispatcher.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
CtrlCloseUI();
|
||||
});
|
||||
|
||||
//TextureHelper.GetCardIcon(true, spr => { ui.loader_payer.texture = spr; });
|
||||
|
||||
ui.text_warn.SetVar("app", Application.productName).FlushVars();
|
||||
// if (GameHelper.GetCurrCountry().ToUpper().Equals("RU"))
|
||||
// {
|
||||
// ui.text_warn.SetVar("payer", "Qiwi").FlushVars();
|
||||
// ui.com_info.cont_counrty.selectedIndex = com_info.Counrty_ru;
|
||||
// ui.btn_confirm.country.selectedIndex = btn_confirm.Country_ru;
|
||||
// ui.com_trans.cont_country.selectedIndex = com_trans.Country_ru;
|
||||
// ui.lang.selectedIndex = com_step.Lang_en;
|
||||
// }
|
||||
// else if (AppConst.isPt())
|
||||
// {
|
||||
// ui.text_warn.SetVar("payer", "Pix").FlushVars();
|
||||
// ui.com_info.cont_counrty.selectedIndex = com_info.Counrty_pt;
|
||||
// ui.btn_confirm.country.selectedIndex = btn_confirm.Country_ru;
|
||||
// ui.com_trans.cont_country.selectedIndex = com_trans.Country_pt;
|
||||
// ui.lang.selectedIndex = com_step.Lang_pt;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
ui.text_warn.SetVar("payer", "Paypal").FlushVars();
|
||||
ui.com_info.cont_counrty.selectedIndex =0;
|
||||
ui.btn_confirm.country.selectedIndex = 0;
|
||||
ui.com_trans.cont_country.selectedIndex = 0;
|
||||
ui.lang.selectedIndex = 0;
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ce936432296ec431dad2c8265343873b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,74 +0,0 @@
|
||||
using BingoBrain.Core;
|
||||
using BingoBrain.HotFix;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class MakeupStepUICtrl : BaseUICtrl
|
||||
{
|
||||
private MakeupStepUI ui;
|
||||
private MakeupStepModel model;
|
||||
|
||||
private uint openUIMsg = SkinInfo. MakeupStepUI_Open;
|
||||
private uint closeUIMsg = SkinInfo. MakeupStepUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst. MakeupStepModel) as MakeupStepModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new MakeupStepUI(this);
|
||||
ui.Open(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CloseUI(object args = null)
|
||||
{
|
||||
if (ui != null && !ui.isClose)
|
||||
{
|
||||
ui.Close();
|
||||
}
|
||||
ui = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
public override uint GetOpenUIMsg(string uiName)
|
||||
{
|
||||
return openUIMsg;
|
||||
}
|
||||
public override uint GetCloseUIMsg(string uiName)
|
||||
{
|
||||
return closeUIMsg;
|
||||
}
|
||||
|
||||
protected override void AddListener()
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58f6d05e1afb4462797f738d770dedd3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ea4f9db1d49a473a8960474e996581a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,25 +0,0 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class MenuCtrl : BaseCtrl
|
||||
{
|
||||
public static MenuCtrl Instance { get; private set; }
|
||||
|
||||
private MenuModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.MenuModel) as MenuModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c51eb71050f964a8b943d064f9e9b786
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,23 +0,0 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class MenuModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d8fc9d7bf29343dcab8a64d87efbfdf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user