新增兑换
This commit is contained in:
@@ -19,7 +19,6 @@ namespace FGUI.JMain
|
||||
public GButton btn_admin;
|
||||
public btn_question btn_question;
|
||||
public GButton btn_saveingpot;
|
||||
public GButton btn_cashout;
|
||||
public btn_petty btn_petty;
|
||||
public GButton btn_play;
|
||||
public GButton btn_wb;
|
||||
@@ -46,10 +45,9 @@ namespace FGUI.JMain
|
||||
btn_admin = (GButton)GetChildAt(12);
|
||||
btn_question = (btn_question)GetChildAt(13);
|
||||
btn_saveingpot = (GButton)GetChildAt(14);
|
||||
btn_cashout = (GButton)GetChildAt(15);
|
||||
btn_petty = (btn_petty)GetChildAt(16);
|
||||
btn_play = (GButton)GetChildAt(17);
|
||||
btn_wb = (GButton)GetChildAt(18);
|
||||
btn_petty = (btn_petty)GetChildAt(15);
|
||||
btn_play = (GButton)GetChildAt(16);
|
||||
btn_wb = (GButton)GetChildAt(17);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,9 @@ namespace FGUI.JMall
|
||||
{
|
||||
public static void BindAll()
|
||||
{
|
||||
UIObjectFactory.SetPackageItemExtension(com_exchange.URL, typeof(com_exchange));
|
||||
UIObjectFactory.SetPackageItemExtension(btn_setnum.URL, typeof(btn_setnum));
|
||||
UIObjectFactory.SetPackageItemExtension(com_makeup.URL, typeof(com_makeup));
|
||||
UIObjectFactory.SetPackageItemExtension(com_mall.URL, typeof(com_mall));
|
||||
UIObjectFactory.SetPackageItemExtension(com_mall_carditem.URL, typeof(com_mall_carditem));
|
||||
UIObjectFactory.SetPackageItemExtension(com_mall_coinitem.URL, typeof(com_mall_coinitem));
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.JMall
|
||||
{
|
||||
public partial class btn_setnum : GButton
|
||||
{
|
||||
public Controller type;
|
||||
public const string URL = "ui://wj1zvor9pf31x";
|
||||
|
||||
public static btn_setnum CreateInstance()
|
||||
{
|
||||
return (btn_setnum)UIPackage.CreateObject("JMall", "btn_setnum");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
type = GetControllerAt(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9958109f48115094cbea8bc607a89f41
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,47 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.JMall
|
||||
{
|
||||
public partial class com_exchange : GComponent
|
||||
{
|
||||
public btn_setnum btn_subcard;
|
||||
public btn_setnum btn_addcard;
|
||||
public GTextField text_card_num;
|
||||
public btn_redeem_coin btn_exchange_card;
|
||||
public btn_setnum btn_subamazon;
|
||||
public btn_setnum btn_addamazon;
|
||||
public GTextField text_amazon_num;
|
||||
public btn_redeem_coin btn_exchange_amazon;
|
||||
public GTextField text_amazon_ch;
|
||||
public com_makeup com_makeup0;
|
||||
public com_makeup com_makeup1;
|
||||
public com_makeup com_makeup2;
|
||||
public const string URL = "ui://wj1zvor9pf31j";
|
||||
|
||||
public static com_exchange CreateInstance()
|
||||
{
|
||||
return (com_exchange)UIPackage.CreateObject("JMall", "com_exchange");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
btn_subcard = (btn_setnum)GetChildAt(5);
|
||||
btn_addcard = (btn_setnum)GetChildAt(6);
|
||||
text_card_num = (GTextField)GetChildAt(7);
|
||||
btn_exchange_card = (btn_redeem_coin)GetChildAt(8);
|
||||
btn_subamazon = (btn_setnum)GetChildAt(10);
|
||||
btn_addamazon = (btn_setnum)GetChildAt(11);
|
||||
text_amazon_num = (GTextField)GetChildAt(12);
|
||||
btn_exchange_amazon = (btn_redeem_coin)GetChildAt(13);
|
||||
text_amazon_ch = (GTextField)GetChildAt(16);
|
||||
com_makeup0 = (com_makeup)GetChildAt(17);
|
||||
com_makeup1 = (com_makeup)GetChildAt(18);
|
||||
com_makeup2 = (com_makeup)GetChildAt(19);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0bea775c9acff6a4b92f889ef597d4fc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,31 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.JMall
|
||||
{
|
||||
public partial class com_makeup : GComponent
|
||||
{
|
||||
public GProgressBar progress_makeup;
|
||||
public GTextField text_progress;
|
||||
public GButton btn_makeup;
|
||||
public GRichTextField text_makeup;
|
||||
public const string URL = "ui://wj1zvor9pf31z";
|
||||
|
||||
public static com_makeup CreateInstance()
|
||||
{
|
||||
return (com_makeup)UIPackage.CreateObject("JMall", "com_makeup");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
progress_makeup = (GProgressBar)GetChildAt(2);
|
||||
text_progress = (GTextField)GetChildAt(3);
|
||||
btn_makeup = (GButton)GetChildAt(4);
|
||||
text_makeup = (GRichTextField)GetChildAt(5);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1eb56f50fb28fea4d98304d7821b072a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1658,7 +1658,7 @@ namespace BingoBrain
|
||||
}
|
||||
public static bool isRDExchangeMode()
|
||||
{
|
||||
return true;//zhushi
|
||||
// return false;//zhushi
|
||||
return SaveData.GetSaveobject().ExchangeModeToggle == 1;
|
||||
}
|
||||
public static string getDesByKey(string key)
|
||||
|
||||
@@ -97,5 +97,9 @@ namespace BingoBrain
|
||||
//小额奖励
|
||||
public int SmallReward;
|
||||
public int ProcessingTime;
|
||||
|
||||
public int ExchangeCard;
|
||||
public int[] ExchangeAmazon;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,6 +134,8 @@ namespace BingoBrain
|
||||
public static uint PettyAwardUI_Open = ++cursor_OpenClose;
|
||||
public static uint PettyAwardUI_Close = ++cursor_OpenClose;
|
||||
|
||||
public static uint ExchangeUI_Open = ++cursor_OpenClose;
|
||||
public static uint ExchangeUI_Close = ++cursor_OpenClose;
|
||||
}
|
||||
public static partial class UICtrlMsg
|
||||
{
|
||||
|
||||
@@ -65,5 +65,6 @@ namespace BingoBrain
|
||||
public const string ThreeDaysGiftCtrl = "ThreeDaysGiftCtrl";
|
||||
public const string RewardMulNewCtrl = "RewardMulNewCtrl";
|
||||
public const string PettyAwardCtrl = "PettyAwardCtrl";
|
||||
public const string ExchangeCtrl = "ExchangeCtrl";
|
||||
}
|
||||
}
|
||||
@@ -53,5 +53,6 @@ namespace BingoBrain
|
||||
public const string ThreeDaysGiftModel = "ThreeDaysGiftModel";
|
||||
public const string RewardMulNewModel = "RewardMulNewModel";
|
||||
public const string PettyAwardModel = "PettyAwardModel";
|
||||
public const string ExchangeModel = "ExchangeModel";
|
||||
}
|
||||
}
|
||||
@@ -48,6 +48,7 @@ namespace BingoBrain
|
||||
moduleBoardk.AddModel(ModelConst.FirstRewardModel, new FirstRewardModel());
|
||||
moduleBoardk.AddModel(ModelConst.PettyAwardModel, new PettyAwardModel());
|
||||
moduleBoardk.AddModel(ModelConst.H5Model, new H5Model());
|
||||
moduleBoardk.AddModel(ModelConst.ExchangeModel, new ExchangeModel());
|
||||
}
|
||||
|
||||
public static void AutoRegisterUIType()
|
||||
@@ -93,6 +94,7 @@ namespace BingoBrain
|
||||
moduleBoardk.AddUIType(UIConst.FirstRewardUI, typeof(FirstRewardUI));
|
||||
moduleBoardk.AddUIType(UIConst.PettyAwardUI, typeof(PettyAwardUI));
|
||||
moduleBoardk.AddUIType(UIConst.H5UI, typeof(H5UI));
|
||||
moduleBoardk.AddUIType(UIConst.ExchangeUI, typeof(ExchangeUI));
|
||||
}
|
||||
|
||||
public static void AutoRegisterCtrl()
|
||||
@@ -139,6 +141,7 @@ namespace BingoBrain
|
||||
moduleBoardk.AddCtrl(CtrlConst.FirstRewardCtrl, new FirstRewardCtrl());
|
||||
moduleBoardk.AddCtrl(CtrlConst.PettyAwardCtrl, new PettyAwardCtrl());
|
||||
moduleBoardk.AddCtrl(CtrlConst.H5Ctrl, new H5Ctrl());
|
||||
moduleBoardk.AddCtrl(CtrlConst.ExchangeCtrl, new ExchangeCtrl());
|
||||
}
|
||||
|
||||
public static void AutoRegisterUICtrl()
|
||||
@@ -185,6 +188,7 @@ namespace BingoBrain
|
||||
moduleBoardk.AddUICtrl(UICtrlConst.FirstRewardUICtrl, new FirstRewardUICtrl());
|
||||
moduleBoardk.AddUICtrl(UICtrlConst.PettyAwardUICtrl, new PettyAwardUICtrl());
|
||||
moduleBoardk.AddUICtrl(UICtrlConst.H5UICtrl, new H5UICtrl());
|
||||
moduleBoardk.AddUICtrl(UICtrlConst.ExchangeUICtrl, new ExchangeUICtrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,5 +103,6 @@ namespace BingoBrain
|
||||
public const string ThreeDaysGiftUI = "ThreeDaysGiftUI";
|
||||
public const string RewardMulNewUI = "RewardMulNewUI";
|
||||
public const string PettyAwardUI = "PettyAwardUI";
|
||||
public const string ExchangeUI = "ExchangeUI";
|
||||
}
|
||||
}
|
||||
@@ -66,5 +66,6 @@ namespace BingoBrain
|
||||
public const string RewardMulNewUICtrl = "RewardMulNewUICtrl";
|
||||
public const string MakeupConfirmUICtrl = "MakeupConfirmUICtrl";
|
||||
public const string PettyAwardUICtrl = "PettyAwardUICtrl";
|
||||
public const string ExchangeUICtrl = "ExchangeUICtrl";
|
||||
}
|
||||
}
|
||||
@@ -173,18 +173,18 @@ 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_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);
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace BingoBrain
|
||||
|
||||
private void OnClickTab(int tabIndex)
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(tabIndex == 1 ? SkinInfo.JMallUI_Open : SkinInfo.JMallUI_Close);
|
||||
UICtrlDispatcher.Instance.Dispatch(tabIndex == 1 ? SkinInfo.ExchangeUI_Open : SkinInfo.ExchangeUI_Close);
|
||||
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);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24463a734e9e90041a72068f560febbe
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,25 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class ExchangeCtrl : BaseCtrl
|
||||
{
|
||||
public static ExchangeCtrl Instance { get; private set; }
|
||||
|
||||
private ExchangeModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.ExchangeModel) as ExchangeModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f1c865d74050b0429513765f7b0f27b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,23 @@
|
||||
using BingoBrain.Core;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class ExchangeModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnReset()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f93991df42069f04ab87cf541b5b184a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,280 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using BingoBrain.Core;
|
||||
using BingoBrain.HotFix;
|
||||
using FGUI.ACommon;
|
||||
using FGUI.JMall;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class ExchangeUI : BaseUI
|
||||
{
|
||||
private ExchangeUICtrl ctrl;
|
||||
private ExchangeModel model;
|
||||
private FGUI.JMall.com_exchange ui;
|
||||
|
||||
public ExchangeUI(ExchangeUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.ExchangeUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "JMall";
|
||||
uiInfo.assetName = "com_exchange";
|
||||
uiInfo.layerType = UILayerType.Normal;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.ExchangeModel) as ExchangeModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.JMall.com_exchange;
|
||||
}
|
||||
|
||||
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 int card_buy_num = 1;
|
||||
private int amazon_buy_num = 1;
|
||||
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
Debug.Log(GameHelper.GetCommonModel().ExchangeCard);
|
||||
Debug.Log(GameHelper.GetCommonModel().ExchangeAmazon);
|
||||
ui.text_amazon_ch.text =(GameHelper.isRDExchangeMode() ? "": "$") + GameHelper.GetCommonModel().ExchangeAmazon[0].ToString();
|
||||
SetGold();
|
||||
ui.btn_addcard.SetClick(() =>
|
||||
{
|
||||
if (card_buy_num >= 10) return;
|
||||
card_buy_num++;
|
||||
SetGold();
|
||||
});
|
||||
ui.btn_subcard.SetClick(() =>
|
||||
{
|
||||
if (card_buy_num <= 1) return;
|
||||
card_buy_num--;
|
||||
SetGold();
|
||||
});
|
||||
|
||||
ui.btn_addamazon.SetClick(() =>
|
||||
{
|
||||
if (amazon_buy_num >= 10) return;
|
||||
amazon_buy_num++;
|
||||
SetGold();
|
||||
});
|
||||
ui.btn_subamazon.SetClick(() =>
|
||||
{
|
||||
if (amazon_buy_num <= 1) return;
|
||||
amazon_buy_num--;
|
||||
SetGold();
|
||||
});
|
||||
|
||||
ui.btn_exchange_card.SetClick(() =>
|
||||
{
|
||||
if (card_buy_num * GameHelper.GetCommonModel().ExchangeCard < PreferencesMgr.Instance.Currency101)
|
||||
{
|
||||
PreferencesMgr.Instance.CardBoardSum = PreferencesMgr.Instance.CardBoardSum + card_buy_num;
|
||||
PreferencesMgr.Instance.Currency101 = PreferencesMgr.Instance.Currency101 - card_buy_num * GameHelper.GetCommonModel().ExchangeCard;
|
||||
GameHelper.ShowTips("Exchange successful");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
GameHelper.ShowTips("There aren't enough gold");
|
||||
}
|
||||
});
|
||||
|
||||
ui.btn_exchange_amazon.SetClick(() =>
|
||||
{
|
||||
if (amazon_buy_num * GameHelper.GetCommonModel().ExchangeAmazon[1] < PreferencesMgr.Instance.Currency101)
|
||||
{
|
||||
SaveingPotHelper.TestingClearTime();
|
||||
SaveData.GetSaveobject().saveingpot_ch = SaveData.GetSaveobject().saveingpot_ch + amazon_buy_num * GameHelper.GetCommonModel().ExchangeAmazon[0];
|
||||
PreferencesMgr.Instance.Currency101 = PreferencesMgr.Instance.Currency101 - amazon_buy_num * GameHelper.GetCommonModel().ExchangeAmazon[1];
|
||||
GameHelper.ShowTips("Exchange successful");
|
||||
}
|
||||
else
|
||||
{
|
||||
GameHelper.ShowTips("There aren't enough gold");
|
||||
}
|
||||
});
|
||||
SetMakeup();
|
||||
}
|
||||
|
||||
private void SetGold()
|
||||
{
|
||||
ui.text_card_num.text = card_buy_num.ToString();
|
||||
ui.text_amazon_num.text = amazon_buy_num.ToString();
|
||||
ui.btn_exchange_card.title = (card_buy_num * GameHelper.GetCommonModel().ExchangeCard).ToString();
|
||||
ui.btn_exchange_amazon.title = (amazon_buy_num * GameHelper.GetCommonModel().ExchangeAmazon[1]).ToString();
|
||||
}
|
||||
|
||||
private void SetMakeup()
|
||||
{
|
||||
|
||||
List<com_makeup> btn_list = new List<com_makeup>() { ui.com_makeup0, ui.com_makeup1, ui.com_makeup2 };
|
||||
|
||||
List<makeup> makeup_list = ConfigSystem.GetConfig<MakeupModel>().dataList;
|
||||
Debug.Log(JsonConvert.SerializeObject(PreferencesMgr.Instance.MakeupTaskHistory));
|
||||
for (int i = 0; i < btn_list.Count; i++)
|
||||
{
|
||||
MakeupTaskData makeupTaskData = null;
|
||||
for (int j = PreferencesMgr.Instance.MakeupTaskHistory.Count - 1; j >= 0; j--)
|
||||
{
|
||||
if (PreferencesMgr.Instance.MakeupTaskHistory[j].tableId == (i + 1))
|
||||
{
|
||||
makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory[j];
|
||||
// now_selectindex = index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (makeupTaskData == null)
|
||||
{
|
||||
makeup makeupVo = makeup_list[i];
|
||||
|
||||
makeupTaskData = new MakeupTaskData();
|
||||
makeupTaskData.tableId = i + 1;
|
||||
makeupTaskData.id = PreferencesMgr.Instance.MakeupTaskHistory.Count + 1;
|
||||
makeupTaskData.amountStr = $"{makeupVo.item_need}";
|
||||
makeupTaskData.amount = makeupVo.item_need;
|
||||
makeupTaskData.orderID = GetRandomNum(8);
|
||||
makeupTaskData.SetStatus(MakeupTaskStatus.None);
|
||||
PreferencesMgr.Instance.MakeupTaskHistory.Add(makeupTaskData);
|
||||
PreferencesMgr.Instance.SaveMakeupTaskHistory();
|
||||
|
||||
}
|
||||
|
||||
btn_list[i].btn_makeup.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.MakeupConfirmUI_Open, makeupTaskData);
|
||||
});
|
||||
btn_list[i].text_makeup.text = (GameHelper.isRDExchangeMode() ? "<img src='ui://pmf3wbji112epi7'/>" : "") +
|
||||
GameHelper.Get102Str_new((decimal)makeupTaskData.amount);
|
||||
if (makeupTaskData.status > MakeupTaskStatus.None)
|
||||
{
|
||||
btn_list[i].text_progress.text = $"{makeupTaskData.amount:N}" + "/" + $"{makeupTaskData.amount:N}";
|
||||
btn_list[i].progress_makeup.value=100;
|
||||
}
|
||||
else
|
||||
{
|
||||
btn_list[i].text_progress.text = $"{PreferencesMgr.Instance.Currency102:N}" + "/" + $"{makeupTaskData.amount:N}";
|
||||
btn_list[i].progress_makeup.value=(double)(PreferencesMgr.Instance.Currency102/makeupTaskData.amount);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
// List<level_btn> btn_list = new List<level_btn>() { ui.com_chlevel.btn_0, ui.com_chlevel.btn_1, ui.com_chlevel.btn_2 };
|
||||
|
||||
// List<makeup> makeup_list = ConfigSystem.GetConfig<MakeupModel>().dataList;
|
||||
// now_selectindex = makeupTaskData.tableId - 1;
|
||||
// for (int i = 0; i < btn_list.Count; i++)
|
||||
// {
|
||||
// btn_list[i].text_level0.text = "Level " + makeup_list[i].levels_need;
|
||||
// btn_list[i].text_level1.text = "Level " + makeup_list[i].levels_need;
|
||||
// btn_list[i].text_level2.text = "Level " + makeup_list[i].levels_need;
|
||||
// if (i < ch_index)
|
||||
// {
|
||||
// btn_list[i].img_check.visible = true;
|
||||
// // btn_list[i].text_level0.y = 4;
|
||||
// // btn_list[i].text_level1.y = 4;
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// btn_list[i].img_check.visible = false;
|
||||
// // btn_list[i].text_level0.y = 38;
|
||||
// // btn_list[i].text_level1.y = 38;
|
||||
// }
|
||||
|
||||
// if (i == now_selectindex)
|
||||
// {
|
||||
// btn_list[i].btn_state.selectedIndex = 1;
|
||||
// }
|
||||
// else if (i > ch_index)
|
||||
// {
|
||||
// btn_list[i].btn_state.selectedIndex = 2;
|
||||
// int _temp_index = i;
|
||||
// btn_list[i].SetClick(() =>
|
||||
// {
|
||||
// GameHelper.ShowTips("Complete level " + makeup_list[_temp_index].levels_need + " to unlock.");
|
||||
// });
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// btn_list[i].btn_state.selectedIndex = 0;
|
||||
// int index = i;
|
||||
// btn_list[i].SetClick(() =>
|
||||
// {
|
||||
// for (int i = PreferencesMgr.Instance.MakeupTaskHistory.Count - 1; i >= 0; i--)
|
||||
// {
|
||||
// if (PreferencesMgr.Instance.MakeupTaskHistory[i].tableId == index + 1)
|
||||
// {
|
||||
// makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory[i];
|
||||
// now_selectindex = index;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
// InitView();
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
public static string GetRandomNum(int count)
|
||||
{
|
||||
var resultStr = new StringBuilder();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
resultStr.Append(UnityEngine.Random.Range(0, 10));
|
||||
}
|
||||
|
||||
return resultStr.ToString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83977547df0702b459b5d46663058214
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,74 @@
|
||||
using BingoBrain.Core;
|
||||
using BingoBrain.HotFix;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class ExchangeUICtrl : BaseUICtrl
|
||||
{
|
||||
private ExchangeUI ui;
|
||||
private ExchangeModel model;
|
||||
|
||||
private uint openUIMsg = SkinInfo.ExchangeUI_Open;
|
||||
private uint closeUIMsg = SkinInfo.ExchangeUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.ExchangeModel) as ExchangeModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new ExchangeUI(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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a926f504377f2d439f5a42267299dea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -179,7 +179,7 @@ namespace BingoBrain
|
||||
}
|
||||
if (PreferencesMgr.Instance.MakeupTaskHistory.Count > 1)
|
||||
{
|
||||
ui.group_.visible = true;
|
||||
// ui.group_.visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -710,6 +710,7 @@ namespace BingoBrain
|
||||
if (makeupTaskData.videoCount >= vo.ad_need)
|
||||
{
|
||||
(ui.btn_chout as FGUI.tixian.btn_get).state.selectedIndex = 0;
|
||||
ui.btn_chout.title = GameHelper.getDesByKey("ch_out_2");
|
||||
ui.btn_chout.SetClick(() =>
|
||||
{
|
||||
if (makeupTaskData.videoCount >= vo.ad_need)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 375 KiB After Width: | Height: | Size: 878 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 200 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 991 KiB |
@@ -0,0 +1,140 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c47ad66c87676554a8fb4b48987abe7f
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1003 KiB |
@@ -0,0 +1,140 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29785a8ad3f9acd4e966dcba2138905d
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user