fix:1、添加项目
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
namespace FlowerPower
|
||||
{
|
||||
public class RainPlayCtrl : BaseCtrl
|
||||
{
|
||||
public static RainPlayCtrl Instance { get; private set; }
|
||||
|
||||
private RainPlayModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.RainPlayModel) as RainPlayModel;
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dccdf152f07be452bbd8727e8a8aa708
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,46 @@
|
||||
namespace FlowerPower
|
||||
{
|
||||
public class RainPlayModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
|
||||
public decimal showDollar;
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eb3e7a6ac36b945dcb2b6b04634732d7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 901f044832e634fd69e12ec14f995ac7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,188 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace FlowerPower
|
||||
{
|
||||
public class RainPlayUICtrl : BaseUICtrl
|
||||
{
|
||||
private RainPlayUI ui;
|
||||
private RainPlayModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.RainPlayUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.RainPlayUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.RainPlayModel) as RainPlayModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new RainPlayUI(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);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.apple_pay_success, pay_success);
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success);
|
||||
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void pay_success(object str)
|
||||
{
|
||||
string type = (string)str;
|
||||
string purch_number = "";
|
||||
if (type == PurchasingManager.buy_one)
|
||||
{
|
||||
|
||||
GameHelper.ShowTips("Purchase successful");
|
||||
if (SuperSpeedViewUICtrl.IsBuySpeed)//这里是超级加速器礼包购买后的逻辑处理,因为和加格子用的同一个商品id,在这里做个区分
|
||||
{
|
||||
SuperSpeedViewUICtrl.IsBuySpeed = false;
|
||||
SaveData.GetSaveobject().IsBuySpeedGift = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SaveData.GetSaveobject().have_slot = true;
|
||||
SaveData.saveDataFunc();
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Slot_refresh);
|
||||
purch_number = GameHelper.GetCommonModel().addspace2.ToString();
|
||||
}
|
||||
|
||||
GameHelper.IsTemporaryEnd = false;
|
||||
}
|
||||
else if (type == PurchasingManager.buy_one_off)
|
||||
{
|
||||
purch_number = GameHelper.GetCommonModel().AddDiscount2.ToString();
|
||||
if (!CheckIsOpen(UIConst.AddViewoffUI))
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Close);
|
||||
SaveData.GetSaveobject().have_slot = true;
|
||||
SaveData.saveDataFunc();
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Slot_refresh);
|
||||
}
|
||||
GameHelper.IsTemporaryEnd = false;
|
||||
}
|
||||
else if (type == PurchasingManager.remove_ad)
|
||||
{
|
||||
SaveData.GetSaveobject().remove_ad_time = (int)GameHelper.GetNowTime() + ConfigSystem.GetConfig<CommonModel>().RemoveADsPackDuration * 3600;
|
||||
SaveData.GetSaveobject().is_get_removead = true;
|
||||
SaveData.saveDataFunc();
|
||||
// GameHelper.AddGoldNumber(ConfigSystem.GetConfig<PaidgiftModel>().dataList[1].coins_quantity);
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.UpdateNoads);
|
||||
GameHelper.ShowTips("Purchase successful");
|
||||
purch_number = ConfigSystem.GetConfig<PaidgiftModel>().dataList[1].Paid_price2.ToString();
|
||||
}
|
||||
else if (type == PurchasingManager.pack_reward)
|
||||
{
|
||||
List<Paidgift> list = ConfigSystem.GetConfig<PaidgiftModel>().dataList;
|
||||
int gold_num = list[0].coins_quantity;
|
||||
int back_num = list[0].props_quantity[1];
|
||||
int out_num = list[0].props_quantity[0];
|
||||
int refresh_num = list[0].props_quantity[2];
|
||||
|
||||
// GameHelper.AddGoldNumber(gold_num);
|
||||
GameHelper.AddItemNumber(0, out_num);
|
||||
GameHelper.AddItemNumber(1, back_num);
|
||||
GameHelper.AddItemNumber(2, refresh_num);
|
||||
SaveData.GetSaveobject().is_get_packreward = true;
|
||||
SaveData.saveDataFunc();
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.UpdateNoads);
|
||||
GameHelper.ShowTips("Purchase successful");
|
||||
purch_number = ConfigSystem.GetConfig<PaidgiftModel>().dataList[0].Paid_price2.ToString();
|
||||
}
|
||||
else if (type == PurchasingManager.fail_pack)
|
||||
{
|
||||
List<Paidgift> list = ConfigSystem.GetConfig<PaidgiftModel>().dataList;
|
||||
purch_number = ConfigSystem.GetConfig<PaidgiftModel>().dataList[2].Paid_price2.ToString();
|
||||
//ui?.setBtnAds();
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.resurgence);
|
||||
|
||||
// PreferencesMgr.Instance.Currency101 += ConfigSystem.GetConfig<PaidgiftModel>().dataList[1].coins_quantity;
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
|
||||
int back_num = list[2].props_quantity[1];
|
||||
int out_num = list[2].props_quantity[0];
|
||||
int refresh_num = list[2].props_quantity[2];
|
||||
//GameHelper.addGoldNumber(gold_num);
|
||||
int gold_num = list[2].coins_quantity;
|
||||
if (!UIManager.Instance.IsExistUI(UIConst.ResurgenceUI)) PreferencesMgr.Instance.Currency101 += gold_num;
|
||||
GameHelper.AddItemNumber(0, out_num);
|
||||
GameHelper.AddItemNumber(1, back_num);
|
||||
GameHelper.AddItemNumber(2, refresh_num);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
|
||||
SaveData.saveDataFunc();
|
||||
|
||||
}
|
||||
else if (type == PurchasingManager.three_days_gift)
|
||||
{
|
||||
SaveData.GetSaveobject().is_get_ThreeDaysGift = true;
|
||||
SaveData.saveDataFunc();
|
||||
purch_number = ConfigSystem.GetConfig<MultigiftModel>().dataList[0].Paid_price2.ToString();
|
||||
}
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
|
||||
|
||||
if (purch_number != "")
|
||||
{
|
||||
GameHelper.SendRevenueToAF(purch_number);
|
||||
}
|
||||
}
|
||||
|
||||
private bool CheckIsOpen(string name)
|
||||
{
|
||||
var isOpen = UIManager.Instance.IsExistUI(name);
|
||||
|
||||
return isOpen;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad90dca2f6a8344fe8ce6cfd224043d1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user