bingo 项目提交

This commit is contained in:
2026-04-20 13:49:36 +08:00
commit ad5920ac6a
5585 changed files with 1216243 additions and 0 deletions
@@ -0,0 +1,48 @@
using System.Collections;
using System.Collections.Generic;
using BingoBrain.Core;
using BingoBrain;
namespace BingoBrain
{
public class PassunlockCtrl : BaseCtrl
{
public static PassunlockCtrl Instance { get; private set; }
private PassunlockModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.PassunlockModel) as PassunlockModel;
}
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: 2b53fa48e580b4882a9c0441fac55e15
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,48 @@
using System.Collections;
using System.Collections.Generic;
using BingoBrain.Core;
namespace BingoBrain
{
public class PassunlockModel : 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
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: eb4bc378cc43143cdaa3c2fa20c27548
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,187 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FairyGUI;
using BingoBrain.Core;
using BingoBrain;
using FGUI.G009_video_animal;
using FGUI.Common_animal;
using System;
namespace BingoBrain
{
public class PassunlockUI : BaseUI
{
private PassunlockUICtrl ctrl;
private PassunlockModel model;
private FGUI.G009_video_animal.com_passunlock ui;
public PassunlockUI(PassunlockUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.PassunlockUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "G009_video_animal";
uiInfo.assetName = "com_passunlock";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.PassunlockModel) as PassunlockModel;
}
protected override void OnClose()
{
}
protected override void OnBind()
{
ui = baseUI as FGUI.G009_video_animal.com_passunlock;
}
protected override void OnOpenBefore(object args)
{
InitView();
ui.btn_close.SetClick(CtrlCloseUI);
int gold = 0;
List<Passportrewards> Passportrewards_list = ConfigSystem.GetConfig<PassportrewardsModel>().dataList;
for (int i = 0; i < Passportrewards_list.Count; i++)
{
if (Passportrewards_list[i].Paid_rewards_type == 0) gold += Passportrewards_list[i].Paid_rewards_num;
}
ui.text_allgold.text = gold.ToString();
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event,BuriedPointEvent.pass_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);
if (GameHelper.IsAdModelOfPay()){
Hall.Instance.UpdateSecondEvent += InitView;
}
}
protected override void RemoveListener()
{
if (GameHelper.IsAdModelOfPay()){
Hall.Instance.UpdateSecondEvent -= InitView;
}
GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success);
}
#endregion
void pay_success(object str)
{
string type = (string)str;
if (type == PurchasingManager.battle_pass)
{
CtrlCloseUI();
}
}
//初始化页面逻辑
private void InitView()
{
if (!GameHelper.IsAdModelOfPay())
{
ui.pay_type.selectedIndex = 1;
decimal price = (decimal)GameHelper.GetCommonModel().Passportgift2;
ui.btn_max_pay.title = GameHelper.Get102Str(price);
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) (ui.btn_max_pay.GetChild("img_saveingpot") as GImage).visible = true;
ui.btn_max_pay.SetClick(() => {
MaxPayClass maxPayData = new()
{
amount = (int)Math.Round(price * 100),
sku = MaxPayManager.battle_pass,
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
return;
}
ui.pay_type.selectedIndex = 0;
btn_green btn_buypass = ui.btn_buypass as btn_green;
ui.text_have.text = "Owner ADs:" + SaveData.GetSaveobject().look_ad_numbers;
ui.need_text.text = "need " + ConfigSystem.GetConfig<CommonModel>().Passportgift + " ADs";
btn_buypass.img_saveingpot.visible = false;
if (SaveData.GetSaveobject().look_ad_numbers >= ConfigSystem.GetConfig<CommonModel>().Passportgift)
{
btn_buypass.state.selectedIndex = 1;
btn_buypass.cooldown.selectedIndex = 0;
ui.btn_buypass.SetClick(() =>
{
ApplePayClass test = new ApplePayClass()
{
sku = PurchasingManager.battle_pass,
};
SaveData.GetSaveobject().look_ad_numbers -= (int)ConfigSystem.GetConfig<CommonModel>().Passportgift;
PurchasingManager.Instance.Purchase(PurchasingManager.battle_pass, test);
NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.pass_success, 1);
});
}
else if (SaveData.GetSaveobject().look_ad_time > GameHelper.GetNowTime())
{
btn_buypass.state.selectedIndex = 0;
btn_buypass.cooldown.selectedIndex = 1;
btn_buypass.text = GameHelper.TimeFormat(SaveData.GetSaveobject().look_ad_time - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
btn_buypass.SetClick(() =>
{
});
}
else
{
btn_buypass.state.selectedIndex = 0;
btn_buypass.cooldown.selectedIndex = 0;
btn_buypass.text = "Watch AD";
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) btn_buypass.img_saveingpot.visible = true;
btn_buypass.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.pass_click, 1);
});
}
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6923c290d351644508b81cee1a88e1d8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,77 @@
using System.Collections;
using System.Collections.Generic;
using BingoBrain.Core;
using BingoBrain;
namespace BingoBrain
{
public class PassunlockUICtrl : BaseUICtrl
{
private PassunlockUI ui;
private PassunlockModel model;
private uint openUIMsg = UICtrlMsg.PassunlockUI_Open;
private uint closeUIMsg = UICtrlMsg.PassunlockUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.PassunlockModel) as PassunlockModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new PassunlockUI(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: 9730d87819cc94ea5b1f8a5871d19ccc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: