feat:1、创建项目

This commit is contained in:
2026-06-25 15:22:28 +08:00
commit c05a65cdc3
6577 changed files with 1168287 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 464d0f1d29749f3448bec8d8c29d27f5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,19 @@
namespace ChillConnect
{
public class AdcomingCtrl : BaseCtrl
{
public static AdcomingCtrl Instance { get; private set; }
private AdcomingModel model;
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: add0f18df6a5e4ef6a14d10ed6c28bd0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,13 @@
namespace ChillConnect
{
public class AdcomingModel : BaseModel
{
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0cee5816f11f844a28e689dfa47c532e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,97 @@
using DG.Tweening;
using FGUI.Common_01;
namespace ChillConnect
{
public class AdcomingUI : BaseUI
{
private AdcomingUICtrl ctrl;
private AdcomingModel model;
private com_adcoming ui;
public AdcomingUI(AdcomingUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.AdcomingUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "Common_01";
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 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(() =>
{
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open);
tweer.Pause();
});
}
private Tween tweer;
void playAni(object a)
{
tweer.Play();
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0286dad7bf74e43758deafb2f090463d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,71 @@
namespace ChillConnect
{
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
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5e2fd97f5671a41419506893c1900982
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3ec7125d0333e284db6729a02dd964b0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,42 @@
namespace ChillConnect
{
public class AddViewCtrl : BaseCtrl
{
public static AddViewCtrl Instance { get; private set; }
private AddViewModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.AddViewModel) as AddViewModel;
}
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: b6058e09514454ec394a1478f2775964
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,43 @@
namespace ChillConnect
{
public class AddViewModel : 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: 1b0a4fbab97e64d5b982896192bb6483
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,224 @@
using System;
using System.Collections.Generic;
using FairyGUI;
using FGUI.AddCell_12;
using FGUI.Common_01;
using IgnoreOPS;
using SGModule.Net;
using SGModule.NetKit;
namespace ChillConnect
{
public class AddViewUI : BaseUI
{
private AddViewUICtrl ctrl;
private AddViewModel model;
private com_addView ui;
public int ad_cool_down = 120;
public btn_watchAd btn_WatchAd;
public AddViewUI(AddViewUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.AddViewUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "AddCell_12";
uiInfo.assetName = "com_addView";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.AddViewModel) as AddViewModel;
}
protected override void OnClose()
{
GameHelper.showGameUI = true;
HallManager.Instance.UpdateSecondEvent -= updateWatchCD;
if (GameHelper.IsAdModelOfPay())
{
AdRedeemManager.Instance.Destroy();
}
if (need_open_turn) GameHelper.CallShowTurn();
}
private bool need_open_turn = false;
protected override void OnBind()
{
ui = baseUI as com_addView;
}
protected override void OnOpenBefore(object args)
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneShow);
if (args != null) need_open_turn = (bool)args;
// ad_cool_down = ConfigSystem.GetConfig<CommonModel>().exchangeCD;
// btn_WatchAd = ui.btn_watch as btn_watchAd;
if (!GameHelper.IsGiftSwitch())
{
GameHelper.GetCommonModel().addspace=1;
}
if (GameHelper.IsAdModelOfPay())
{
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
ui.btn_watch.GetChild("img_saveingpot").visible = true;
}
btn_watchAd btn = ui.btn_watch as btn_watchAd;
btn.buy_type.selectedIndex = 0;
AdRedeemManager.Instance.SetWatchAd(PurchasingManager.GetPaySku(PayType.buy_one), ui.btn_watch as btn_watchAd, SetTextString);
ui.pay_type.selectedIndex = 0;
AdRedeemManager.Instance.Start();
SetTextString();
}
else
{
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
ui.btn_max_pay.GetChild("img_saveingpot").visible = true;
}
ui.pay_type.selectedIndex = 1;
decimal price = (decimal)GameHelper.GetCommonModel().addspace2;
ui.btn_max_pay.title = GameHelper.getPrice(price);
ui.btn_max_pay.SetClick(() =>
{
ApplePayClass maxPayData = new ApplePayClass
{
amount = (int)Math.Round(price * 100),
sku = PurchasingManager.GetPaySku(PayType.buy_one),
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
}
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.apple_pay_success, pay_success);
}
protected override void RemoveListener()
{
GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success);
}
#endregion
void pay_success(object str)
{
string type = (string)str;
if (type == PurchasingManager.GetPaySku(PayType.buy_one))
{
CtrlCloseUI();
GameDispatcher.Instance.Dispatch(GameMsg.resurgence_close);
}
}
//初始化页面逻辑
private void InitView()
{
ui.btn_close.SetClick(() =>
{
CtrlCloseUI();
GameDispatcher.Instance.Dispatch(GameMsg.resurgence_close);
});
// HallManager.Instance.UpdateSecondEvent += updateWatchCD;
// updateWatchCD();
// checkBtnState();
InitBroadCast();
HallManager.Instance.UpdateSecondEvent += updateWatchCD;
updateWatchCD();
if (GameHelper.IsGiftSwitch())
{
ui.broad.visible = true;
}
}
public void SetTextString()
{
var need = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.buy_one));
var myAd = AdRedeemManager.Instance.GetLookRewardADNum();
ui.tips.SetVar("num", need.ToString()).FlushVars();
ui.ads.SetVar("num", myAd.ToString()).FlushVars();
ui.ads.SetVar("need", need.ToString()).FlushVars();
}
void updateWatchCD()
{
broadtime++;
BroadCast();
}
private int broadtime = 1;
private List<string> config_name_list = ConfigSystem.GetConfig<LevelAttemptsModel>().config_name_list;
private List<string> config_money_list = ConfigSystem.GetConfig<LevelAttemptsModel>().config_money_list;
private List<string[]> broad_list = new List<string[]>();
private void BroadCast()
{
if (broadtime % 3 == 0)
{
(ui.broad as com_broadcast_new).t1.Play(() =>
{
broad_list.RemoveAt(0);
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
broad_list.Add(new string[2] { config_name_list[name_index], config_money_list[money_index] });
for (int i = 0; i < 4; i++)
{
text_list[i].text = "Congratulations,User [color=#ad4800][size=36]" + broad_list[i][0] + "[/size][/color] !After purchasing the +1 Block Pack,play [color=#ad4800]" + broad_list[i][1] + "[/color] matcher to clear the level!";
}
});
}
}
private List<GTextField> text_list = new List<GTextField>();
private void InitBroadCast()
{
text_list.Add((ui.broad as com_broadcast_new).text_0);
text_list.Add((ui.broad as com_broadcast_new).text_1);
text_list.Add((ui.broad as com_broadcast_new).text_2);
text_list.Add((ui.broad as com_broadcast_new).text_3);
for (int i = 0; i < 4; i++)
{
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
broad_list.Add(new string[2] { config_name_list[name_index], config_money_list[money_index] });
text_list[i].text = "Congratulations,User [color=#ad4800][size=36]" + broad_list[i][0] + "[/size][/color] !After purchasing the +1 Block Pack,play [color=#ad4800]" + broad_list[i][1] + "[/color] matcher to clear the level!";
}
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 40b42d370a2c34db89da3decb4b3ba0d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,71 @@
namespace ChillConnect
{
public class AddViewUICtrl : BaseUICtrl
{
private AddViewUI ui;
private AddViewModel model;
private uint openUIMsg = UICtrlMsg.BuyslotUI_Open;
private uint closeUIMsg = UICtrlMsg.BuyslotUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.AddViewModel) as AddViewModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new AddViewUI(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: 4c4feca1f3dc94e0291dbe534b773067
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d9d0bb86413f7ae46bd45ac817d2a778
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
namespace ChillConnect
{
public class AddViewoffCtrl : BaseCtrl
{
public static AddViewoffCtrl Instance { get; private set; }
private AddViewoffModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.AddViewoffModel) as AddViewoffModel;
}
protected override void OnDispose()
{
Instance = null;
}
#endregion
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6254fab7306ab4f54b9ddc37e9f9c554
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
namespace ChillConnect
{
public class AddViewoffModel : BaseModel
{
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
#endregion
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8927197c6cb1f412d83d93ded8cf1589
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,225 @@
using System;
using System.Collections.Generic;
using FairyGUI;
using FGUI.AddCell_12;
using FGUI.Common_01;
using IgnoreOPS;
using SGModule.Net;
using SGModule.NetKit;
namespace ChillConnect
{
public class AddViewoffUI : BaseUI
{
private AddViewoffUICtrl ctrl;
private AddViewoffModel model;
private com_addView_off ui;
public AddViewoffUI(AddViewoffUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.AddViewoffUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "AddCell_12";
uiInfo.assetName = "com_addView_off";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.AddViewoffModel) as AddViewoffModel;
}
protected override void OnClose()
{
GameHelper.showGameUI = true;
HallManager.Instance.UpdateSecondEvent -= updateWatchCD;
if (GameHelper.IsAdModelOfPay())
{
AdRedeemManager.Instance.Destroy();
}
}
protected override void OnBind()
{
ui = baseUI as com_addView_off;
}
protected override void OnOpenBefore(object args)
{
// if (ui.btn_watch is btn_watchAd watchAdBtn)
// {
// CommonTools.GetInstance.InitAdBtnAnim(watchAdBtn.icon_Parent);
// }
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneOffClick);
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
(ui.btn_max_pay.GetChild("img_saveingpot") as GImage).visible = true;
}
// ad_cool_down = ConfigSystem.GetConfig<CommonModel>().exchangeCD;
// btn_WatchAd = ui.btn_watch as btn_watchAd;
if (GameHelper.IsAdModelOfPay())
{
AdRedeemManager.Instance.SetWatchAd(PurchasingManager.GetPaySku(PayType.buy_one_off), ui.btn_watch as btn_watchAd, SetTextString);
ui.pay_type.selectedIndex = 0;
ui.text_old_price.text = GameHelper.GetCommonModel().addspace + "ADs";
btn_watchAd btn = ui.btn_watch as btn_watchAd;
btn.buy_type.selectedIndex = 1;
AdRedeemManager.Instance.Start();
SetTextString();
}
else
{
ui.pay_type.selectedIndex = 1;
ui.text_old_price.text = "$ " + GameHelper.GetCommonModel().addspace2;
decimal price = (decimal)GameHelper.GetCommonModel().AddDiscount2;
ui.btn_max_pay.title = GameHelper.getPrice(price);
ui.btn_max_pay.SetClick(() =>
{
ApplePayClass maxPayData = new ApplePayClass
{
amount = (int)Math.Round(price * 100),
sku = PurchasingManager.GetPaySku(PayType.buy_one_off),
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
}
InitBroadCast();
InitView();
if (GameHelper.IsGiftSwitch())
{
ui.broad.visible = true;
}
}
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 pay_success(object str)
{
string type = (string)str;
if (type == PurchasingManager.GetPaySku(PayType.buy_one_off))
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.AddViewoffUI_Close);
SaveData.GetSaveObject().have_slot = true;
SaveData.saveDataFunc();
GameDispatcher.Instance.Dispatch(GameMsg.Slot_refresh);
GameDispatcher.Instance.Dispatch(GameMsg.resurgence_close);
CtrlCloseUI();
}
}
//初始化页面逻辑
private void InitView()
{
// var tAnimation = FXManager.Instance.SetFx<SkeletonAnimation>(ui.tip_parent, Fx_Type.Fx_AddBoxTip, ref _closeCallback);
// tAnimation.state.AddAnimation(0, "animation", true, 0);
ui.btn_close.SetClick(() =>
{
GameDispatcher.Instance.Dispatch(GameMsg.resurgence_close);
CtrlCloseUI();
});
HallManager.Instance.UpdateSecondEvent += updateWatchCD;
broadtime++;
BroadCast();
}
void updateWatchCD()
{
ui.text_time.text = CommonHelper.TimeFormat(SaveData.GetSaveObject().addview_off_time - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
}
public void SetTextString()
{
var need = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.buy_one_off));
var myAd = AdRedeemManager.Instance.GetLookRewardADNum();
ui.tips.SetVar("num", need.ToString()).FlushVars();
ui.ads.SetVar("num", myAd + "/").FlushVars();
ui.ads.SetVar("num1", need.ToString()).FlushVars();
}
private int broadtime = 1;
private List<string> config_name_list = ConfigSystem.GetConfig<LevelAttemptsModel>().config_name_list;
private List<string> config_money_list = ConfigSystem.GetConfig<LevelAttemptsModel>().config_money_list;
private List<string[]> broad_list = new List<string[]>();
private void BroadCast()
{
if (broadtime % 3 == 0)
{
(ui.broad as com_broadcast_new).t1.Play(() =>
{
broad_list.RemoveAt(0);
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
broad_list.Add(new string[2] { config_name_list[name_index], config_money_list[money_index] });
for (int i = 0; i < 4; i++)
{
text_list[i].text = "Congratulations,User [color=#ad4800][size=36]" + broad_list[i][0] + "[/size][/color] !After purchasing the +1 Block Pack,play [color=#ad4800]" + broad_list[i][1] + "[/color] matcher to clear the level!";
}
});
}
}
private List<GTextField> text_list = new List<GTextField>();
private void InitBroadCast()
{
text_list.Add((ui.broad as com_broadcast_new).text_0);
text_list.Add((ui.broad as com_broadcast_new).text_1);
text_list.Add((ui.broad as com_broadcast_new).text_2);
text_list.Add((ui.broad as com_broadcast_new).text_3);
for (int i = 0; i < 4; i++)
{
int name_index = UnityEngine.Random.Range(0, config_name_list.Count);
int money_index = UnityEngine.Random.Range(0, config_money_list.Count);
broad_list.Add(new string[2] { config_name_list[name_index], config_money_list[money_index] });
text_list[i].text = "Congratulations,User [color=#ad4800][size=36]" + broad_list[i][0] + "[/size][/color] !After purchasing the +1 Block Pack,play [color=#ad4800]" + broad_list[i][1] + "[/color] matcher to clear the level!";
}
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 95a4ab1450a704a8a86208f20b15f859
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,73 @@
namespace ChillConnect
{
public class AddViewoffUICtrl : BaseUICtrl
{
private AddViewoffUI ui;
private AddViewoffModel model;
private uint openUIMsg = UICtrlMsg.AddViewoffUI_Open;
private uint closeUIMsg = UICtrlMsg.AddViewoffUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.AddViewoffModel) as AddViewoffModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new AddViewoffUI(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: 0482db053a1ce45d989a2e4a715dff81
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ba8038fc2cb1842cbbdae804b4f0982c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,25 @@
namespace ChillConnect
{
public class AddviewnewCtrl : BaseCtrl
{
public static AddviewnewCtrl Instance { get; private set; }
private AddviewnewModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.AddviewnewModel) as AddviewnewModel;
}
protected override void OnDispose()
{
Instance = null;
}
#endregion
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4cc0dc1a5313d412a83b8e39a7efb8fc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
namespace ChillConnect
{
public class AddviewnewModel : BaseModel
{
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
#endregion
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 046c52d08595a4040a001d8004b8875c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,258 @@
using FGUI.Common_01;
using UnityEngine;
using FairyGUI;
using IgnoreOPS;
using System;
using Spine.Unity;
using FGUI.AddCell_12;
using SGModule.Net;
using SGModule.NetKit;
namespace ChillConnect
{
public class AddviewnewUI : BaseUI
{
private AddviewnewUICtrl ctrl;
private AddviewnewModel model;
private FGUI.ZM_AddCell_12.com_addView_new ui;
private bool is_off = false;
public AddviewnewUI(AddviewnewUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.AddviewnewUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "ZM_AddCell_12";
uiInfo.assetName = "com_addView_new";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.AddviewnewModel) as AddviewnewModel;
}
private Action closeCallback;
protected override void OnClose()
{
GameHelper.showGameUI = true;
HallManager.Instance.UpdateSecondEvent -= updateWatchCD;
closeCallback?.Invoke();
AdRedeemManager.Instance.Destroy();
}
protected override void OnBind()
{
ui = baseUI as FGUI.ZM_AddCell_12.com_addView_new;
}
protected override void OnOpenBefore(object args)
{
// if (ui.btn_watch is btn_watchAd watchAdBtn)
// {
// CommonTools.GetInstance.InitAdBtnAnim(watchAdBtn.icon_Parent);
// }
if (SaveData.GetSaveObject().addview_off_time > GameHelper.GetNowTime()) is_off = true;
ui.text_out.text = "x" + GameHelper.GetItemNumber(0);
ui.text_back.text = "x" + GameHelper.GetItemNumber(1);
ui.text_refresh.text = "x" + GameHelper.GetItemNumber(2);
ui.text_level.text = "Level " + GameHelper.GetLevel();
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneNewShow);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyOneNewShow, 1);
ui.btn_play.SetClick(() =>
{
GameHelper.gameType = 0;
GameDispatcher.Instance.Dispatch(GameMsg.OpenGame);
CtrlCloseUI();
});
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
(ui.btn_max_pay.GetChild("img_saveingpot") as GImage).visible = true;
}
// (ui.btn_watch.GetChild("btn_text") as GTextField).scale = new Vector2(0.7f, 0.7f);
// (ui.btn_watch.GetChild("title1") as GTextField).scale = new Vector2(0.7f, 0.7f);
// ui.btn_watch.GetChild("img_saveingpot").x += 20;
// ui.btn_watch.GetChild("img_saveingpot").y -= 33;
// ad_cool_down = ConfigSystem.GetConfig<CommonModel>().exchangeCD;
// btn_WatchAd = ui.btn_watch as btn_watchAd;
if (GameHelper.IsAdModelOfPay())
{
if (is_off)
{
AdRedeemManager.Instance.SetWatchAd(PurchasingManager.GetPaySku(PayType.buy_one_off), ui.btn_watch as btn_watchAd, () =>
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneNewClick);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyOneNewClick, 1);
SetTextString();
});
ui.pay_type.selectedIndex = 0;
AdRedeemManager.Instance.Start();
}
else
{
AdRedeemManager.Instance.SetWatchAd(PurchasingManager.GetPaySku(PayType.buy_one), ui.btn_watch as btn_watchAd, () =>
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneNewClick);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyOneNewClick, 1);
SetTextString();
});
ui.pay_type.selectedIndex = 0;
AdRedeemManager.Instance.Start();
}
SetTextString();
}
else
{
ui.pay_type.selectedIndex = 1;
if (is_off)
{
decimal price = (decimal)GameHelper.GetCommonModel().AddDiscount2;
ui.btn_max_pay.title = GameHelper.getPrice(price);
ui.btn_max_pay.SetClick(() =>
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneNewClick);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyOneNewClick, 1);
ApplePayClass maxPayData = new ApplePayClass
{
amount = (int)Math.Round(price * 100),
sku = PurchasingManager.GetPaySku(PayType.buy_one_off),
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
}
else
{
decimal price = (decimal)GameHelper.GetCommonModel().addspace2;
ui.btn_max_pay.title = GameHelper.getPrice(price);
ui.btn_max_pay.SetClick(() =>
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneNewClick);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyOneNewClick, 1);
ApplePayClass maxPayData = new ApplePayClass()
{
amount = (int)Math.Round(price * 100),
sku = PurchasingManager.GetPaySku(PayType.buy_one),
currency = "USD"
};
MaxPayManager.Instance.Buy(maxPayData);
});
}
}
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.apple_pay_success, pay_success);
GameDispatcher.Instance.AddListener(GameMsg.Sheep_item_refresh, SetItemNumber);
}
protected override void RemoveListener()
{
GameDispatcher.Instance.RemoveListener(GameMsg.apple_pay_success, pay_success);
GameDispatcher.Instance.RemoveListener(GameMsg.Sheep_item_refresh, SetItemNumber);
}
#endregion
void SetItemNumber(object a)
{
ui.text_out.text = "x" + GameHelper.GetItemNumber(0);
ui.text_back.text = "x" + GameHelper.GetItemNumber(1);
ui.text_refresh.text = "x" + GameHelper.GetItemNumber(2);
}
void pay_success(object str)
{
string type = (string)str;
if (type == PurchasingManager.GetPaySku(PayType.buy_one) || type == PurchasingManager.GetPaySku(PayType.buy_one_off))
{
TrackKit.SendEvent(GameHelper.getTrackEvenName(),Property.BuyOneNewSuccess);
// NetworkKit.BuriedPoint(BuriedPointEvent.Apple_pay_event, BuriedPointEvent.BuyOneNewSuccess, 1);
SaveData.GetSaveObject().have_slot = true;
SaveData.saveDataFunc();
GameDispatcher.Instance.Dispatch(GameMsg.Slot_refresh);
ui.pay_type.selectedIndex = 2;
SkeletonAnimation addeffect = FXManager.Instance.SetFx<SkeletonAnimation>(ui.ani_parent1, Fx_Type.fx_addeffect, ref closeCallback);
addeffect.state.SetAnimation(0, "animation", true);
SkeletonAnimation addeffect1 = FXManager.Instance.SetFx<SkeletonAnimation>(ui.ani_parent2, Fx_Type.fx_addeffect_1, ref closeCallback);
addeffect1.state.SetAnimation(0, "animation", true);
// CtrlCloseUI();
}
}
//初始化页面逻辑
private void InitView()
{
// var tAnimation = FXManager.Instance.SetFx<SkeletonAnimation>(ui.tip_parent, Fx_Type.Fx_AddBoxTip, ref _closeCallback);
// tAnimation.state.AddAnimation(0, "animation", true, 0);
ui.btn_close.SetClick(() =>
{
GameDispatcher.Instance.Dispatch(GameMsg.OpenGame);
CtrlCloseUI();
});
HallManager.Instance.UpdateSecondEvent += updateWatchCD;
ui.btn_addback.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SheepwindowUI_Open, 1);
});
ui.btn_addout.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SheepwindowUI_Open, 0);
});
ui.btn_addrefresh.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SheepwindowUI_Open, 2);
});
// updateWatchCD();
// checkBtnState();
}
void updateWatchCD()
{
}
public void SetTextString()
{
int need = 0;
if (is_off) need = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.buy_one_off));
else need = AdRedeemManager.Instance.GetCeilingNeedAds(PurchasingManager.GetPaySku(PayType.buy_one));
var myAd = AdRedeemManager.Instance.GetLookRewardADNum();
// ui.tips.SetVar("num", need.ToString()).FlushVars();
ui.ads.SetVar("num", myAd + "/").FlushVars();
ui.ads.SetVar("need", need.ToString()).FlushVars();
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3b62f3687397048a0a4365a156cc3eac
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,73 @@
namespace ChillConnect
{
public class AddviewnewUICtrl : BaseUICtrl
{
private AddviewnewUI ui;
private AddviewnewModel model;
private uint openUIMsg = UICtrlMsg.AddviewnewUI_Open;
private uint closeUIMsg = UICtrlMsg.AddviewnewUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.AddviewnewModel) as AddviewnewModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new AddviewnewUI(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: a375bc5ca46a34c92bc7dfa4c493c980
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 99b35dd79cc746fb867ca30280e93cf1
timeCreated: 1781178068
@@ -0,0 +1,19 @@
namespace ChillConnect
{
public class ArrowGameCtrl : BaseCtrl
{
public static ArrowGameCtrl Instance { get; private set; }
private ArrowGameModel model;
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 0dfe8f46fa1e414b944056bbe769fa67
timeCreated: 1781178068
@@ -0,0 +1,13 @@
namespace ChillConnect
{
public class ArrowGameModel : BaseModel
{
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e6e908da0a114c6aab92325f6c42619d
timeCreated: 1781178068
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1a4af5e7d0ee45ed84096f4ea23331c2
timeCreated: 1781178068
@@ -0,0 +1,71 @@
namespace ChillConnect
{
public class ArrowGameUICtrl : BaseUICtrl
{
private ArrowGameUI ui;
private ArrowGameModel model;
private uint openUIMsg = UICtrlMsg.ArrowGameUI_Open;
private uint closeUIMsg = UICtrlMsg.ArrowGameUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.ArrowGameModel) as ArrowGameModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new ArrowGameUI(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,3 @@
fileFormatVersion: 2
guid: 74f557b8baf9421bb8cc5c01adcd09b3
timeCreated: 1781178068
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 19deb03247c2420ea0ea24e4b9078852
timeCreated: 1781573811
@@ -0,0 +1,41 @@
namespace ChillConnect
{
public class ArrowThemeCtrl : BaseCtrl
{
public static ArrowThemeCtrl Instance { get; private set; }
private ArrowThemeModel model;
#region
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
#endregion
#region
protected override void RemoveListener()
{
}
protected override void AddServerListener()
{
}
protected override void AddListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e50273fc8b5c4fd28617651e820de81c
timeCreated: 1781573811
@@ -0,0 +1,43 @@
namespace ChillConnect
{
public class ArrowThemeModel : 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,3 @@
fileFormatVersion: 2
guid: cf2b28aa9d18433f9e27343cfcab577d
timeCreated: 1781573811
@@ -0,0 +1,149 @@
using System;
using FGUI.Arrow_game;
using FGUI.Arrow_Theme;
namespace ChillConnect
{
public class ArrowThemeUI : BaseUI
{
private ArrowThemeUICtrl ctrl;
private ArrowThemeModel model;
private com_theme ui;
private Action closeCallback;
public ArrowThemeUI(ArrowThemeUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.ArrowThemeUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "Arrow_Theme";
uiInfo.assetName = "com_theme";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = true;
uiInfo.isNeedCloseAnim = true;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.GameResultModel) as GameResultModel;
}
protected override void OnClose()
{
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
}
//
protected override void OnBind()
{
ui = baseUI as com_theme;
}
private SuccessData successData_;
protected override void OnOpenBefore(object args)
{
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
ui.btn_switch.state.selectedIndex = DataMgr.ArrowDarkTheme.Value;
SetBtnState();
ui.btn_dark.SetClick(() => { SetBtnClick(0); });
// ui.btn_worm.SetClick(() => { SetBtnClick(1); });
ui.btn_colours.SetClick(() => { SetBtnClick(2); });
ui.btn_switch.SetClick(() =>
{
if (DataMgr.ArrowDarkTheme.Value == 0)
{
DataMgr.ArrowDarkTheme.Value = 1;
}
else
{
DataMgr.ArrowDarkTheme.Value = 0;
}
ui.btn_switch.state.selectedIndex = DataMgr.ArrowDarkTheme.Value;
GameDispatcher.Instance.Dispatch(GameMsg.ThemeChange);
});
ui.btn_close.SetClick(() =>
{
CtrlCloseUI();
});
}
private void SetBtnClick(int index)
{
DataMgr.ArrowTheme.Value = index;
SetBtnState();
GameDispatcher.Instance.Dispatch(GameMsg.ThemeChange);
}
private void SetBtnState()
{
switch (DataMgr.ArrowTheme.Value)
{
case 0:
((btn_green)ui.btn_dark).touchable = false;
((btn_green)ui.btn_worm).touchable = true;
((btn_green)ui.btn_colours).touchable = true;
((btn_green)ui.btn_dark).state.selectedIndex = 0;
((btn_green)ui.btn_worm).state.selectedIndex = 1;
((btn_green)ui.btn_colours).state.selectedIndex = 1;
break;
case 1:
((btn_green)ui.btn_dark).touchable = true;
((btn_green)ui.btn_worm).touchable = false;
((btn_green)ui.btn_colours).touchable = true;
((btn_green)ui.btn_dark).state.selectedIndex = 1;
((btn_green)ui.btn_worm).state.selectedIndex = 0;
((btn_green)ui.btn_colours).state.selectedIndex = 1;
break;
case 2:
((btn_green)ui.btn_dark).touchable = true;
((btn_green)ui.btn_worm).touchable = true;
((btn_green)ui.btn_colours).touchable = false;
((btn_green)ui.btn_dark).state.selectedIndex = 1;
((btn_green)ui.btn_worm).state.selectedIndex = 1;
((btn_green)ui.btn_colours).state.selectedIndex = 0;
break;
}
}
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 time_count;
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 730d3bd4697242e9a28a7f9b2933bcbb
timeCreated: 1781573811
@@ -0,0 +1,87 @@
using DG.Tweening;
namespace ChillConnect
{
public class ArrowThemeUICtrl : BaseUICtrl
{
private ArrowThemeUI ui;
private ArrowThemeModel model;
private uint openUIMsg = UICtrlMsg.ArrowThemeUI_Open;
private uint closeUIMsg = UICtrlMsg.ArrowThemeUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.GameResultModel) as GameResultModel;
}
protected override void OnDispose()
{
}
private object m_data;
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new ArrowThemeUI(this);
ui.Open(args);
}
else
{
m_data ??= args;
}
}
public override void CloseUI(object args = null)
{
if (ui != null && !ui.isClose)
{
ui.Close();
}
ui = null;
if (m_data != null)
{
DOVirtual.DelayedCall(0.2f, () =>
{
OpenUI(m_data);
m_data = 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,3 @@
fileFormatVersion: 2
guid: f49d5a3813264e589acb43f743d50d24
timeCreated: 1781573811
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 43952a38995845739a7519afd4bb7d1c
timeCreated: 1781677288
@@ -0,0 +1,19 @@
namespace ChillConnect
{
public class ArrowTipsCtrl : BaseCtrl
{
public static ArrowTipsCtrl Instance { get; private set; }
private ArrowTipsModel model;
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d070658caacf42a79ba55d6ac90d78a6
timeCreated: 1781677288
@@ -0,0 +1,15 @@
namespace ChillConnect
{
public class ArrowTipsModel : BaseModel
{
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4051b0d4995a4a1399d64e95c6c582f1
timeCreated: 1781677288
@@ -0,0 +1,92 @@
using System;
using FGUI.Arrow_game;
using UnityEngine;
namespace ChillConnect
{
public class ArrowTipsUI : BaseUI
{
private ArrowTipsUICtrl ctrl;
private ArrowTipsModel model;
private com_tips ui;
public ArrowTipsUI(ArrowTipsUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.ArrowTipsUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "Arrow_game";
uiInfo.assetName = "com_tips";
uiInfo.layerType = UILayerType.Loading;
uiInfo.isNeedUIMask = true;
uiInfo.isNeedOpenAnim = true;
uiInfo.isNeedCloseAnim = true;
}
protected override void OnInit()
{
}
protected override void OnClose()
{
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
CommonHelper.FadeOut(ui);
}
protected override void OnBind()
{
ui = baseUI as com_tips;
}
protected override void OnOpenBefore(object args)
{
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
if (args != null)
InitView((int)args);
}
protected override void OnOpen(object args)
{
CommonHelper.FadeIn(ui);
}
protected override void AddListener()
{
}
protected override void RemoveListener()
{
}
private void InitView(int type)
{
int state = type;
Debug.Log($"tips state = {state} ");
// 0 提示 1 删除道具
ui.state.selectedIndex = state;
ui.btn_watch.SetClick(() =>
{
string idStr = state == 1 ? "deletePop" : "HintPop";
GameHelper.ShowVideoAd(idStr, isSuccess =>
{
if (isSuccess)
{
Debug.Log($"isSuccess tips state = {state} ");
GameDispatcher.Instance.Dispatch(GameMsg.UseProps, state);
CtrlCloseUI();
}
});
});
ui.btn_close.SetClick(CtrlCloseUI);
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4737faa4124f48fabc5ef35ef2ff9f2f
timeCreated: 1781677288
@@ -0,0 +1,60 @@
namespace ChillConnect
{
public class ArrowTipsUICtrl : BaseUICtrl
{
private ArrowTipsUI ui;
private ArrowTipsModel model;
private uint openUIMsg = UICtrlMsg.ArrowTipsUI_Open;
private uint closeUIMsg = UICtrlMsg.ArrowTipsUI_Close;
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new ArrowTipsUI(this);
ui.Open(args);
}
}
public override void CloseUI(object args = null)
{
if (ui != null && !ui.isClose)
{
ui.Close();
}
ui = null;
}
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);
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5e1a6be77c1c462a86ed773072d923d3
timeCreated: 1781677288
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 853c139d37358bd408e450426db88350
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,19 @@
namespace ChillConnect
{
public class BroadcastCtrl : BaseCtrl
{
public static BroadcastCtrl Instance { get; private set; }
private BroadcastModel model;
protected override void OnInit()
{
Instance = this;
}
protected override void OnDispose()
{
Instance = null;
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 575f1d3d71a8445bc8d960a3f33d8bc1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,13 @@
namespace ChillConnect
{
public class BroadcastModel : BaseModel
{
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2362fee130b6f4067b943f44ba629113
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,214 @@
using System;
using System.Collections.Generic;
using DG.Tweening;
using FairyGUI;
using FGUI.Common_01;
using IgnoreOPS;
using Spine.Unity;
using UnityEngine;
using Random = UnityEngine.Random;
namespace ChillConnect
{
public class BroadcastUI : BaseUI
{
private BroadcastUICtrl ctrl;
private BroadcastModel model;
private com_broadcast1 ui;
public BroadcastUI(BroadcastUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.BroadcastUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "Common_01";
uiInfo.assetName = "com_broadcast1";
uiInfo.layerType = UILayerType.Top;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = false;
}
#region
protected override void OnInit()
{
}
protected override void OnClose()
{
}
protected override void OnBind()
{
ui = baseUI as com_broadcast1;
}
protected override void OnOpenBefore(object args)
{
ui.x = (GRoot.inst.width - 1080) / 2;
InitView();
//ui.y = 241;
if (UIManager.Instance.IsExistUI(UIConst.RainPlayUI))
{
Settop();
}
else
{
Setbuttom();
}
// ui.visible = false;
// if (Screen.safeArea.y != 0)
// {//刘海屏
// ui.y += Screen.safeArea.y;
// }
text_ui = ui.broad_cast_text;
ui.btn_record.SetClick(OpenRecord);
ui.broad_cast_text.btn_broad.SetClick(OpenRecord);
if (ConfigSystem.GetConfig<exBrPoolModel>() == null) return;
config_name_list = ConfigSystem.GetConfig<exBrPoolModel>().config_name_list;
config_money_list = ConfigSystem.GetConfig<exBrPoolModel>().config_money_list;
GameDispatcher.Instance.AddListener(GameMsg.hideBroadCast, hideEvent);
GameDispatcher.Instance.AddListener(GameMsg.showBroadCast, showEvent);
UICtrlDispatcher.Instance.AddListener(UICtrlMsg.MainUI_Open, Setbuttom);
UICtrlDispatcher.Instance.AddListener(UICtrlMsg.RainPlayUI_Open, Settop);
}
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 time_count = 11;
private com_broadcast_text1 text_ui;
private List<string> config_name_list;
private List<string> config_money_list;
private bool main_ui_show = true;
//初始化页面逻辑
private Action closeCallback;
private void InitView()
{
HallManager.Instance.UpdateSecondEvent += timeEvent;
// var sk = FXManager.Instance.SetFx<SkeletonAnimation>(ui.broad_cast_text.bg_panel, Fx_Type.fx_broad, ref closeCallback);
// sk.state.SetAnimation(0, "animation", true);
}
private void OpenRecord()
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RecordViewUI_Open);
}
private void hideEvent(object sender = null)
{
Debug.Log("hide");
main_ui_show = false;
ui.visible = false;
}
private void showEvent(object sender = null)
{
Debug.Log("show");
main_ui_show = true;
ui.visible = true;
}
private void Settop(object sender = null)
{
ui.group_.y = 340;
if (Screen.safeArea.y != 0)
{//刘海屏
ui.group_.y += 68;
}
}
private void Setbuttom(object sender = null)
{
ui.group_.y = 184;
if (Screen.safeArea.y != 0)
{//刘海屏
ui.group_.y += 68;
}
}
void timeEvent()
{
time_count++;
// if (time_count > 30)
// {
// time_count = 0;
// var name_index = UnityEngine.Random.Range(0, config_name_list.Count);
// var money_index = UnityEngine.Random.Range(0, config_money_list.Count);
// if (main_ui_show)
// {
// ui.visible = true;
// }
// Debug.Log(text_ui.cast_text.text);
// text_ui.cast_text.text = String.Format(text_ui.hide_text.text, config_name_list[name_index],
// config_money_list[money_index], DateTimeManager.Instance.GetCurrDateTime());
// text_ui.cast_text.x = 686;
// Tweener tweener = DOTween.To(() => text_ui.cast_text.x,
// x => text_ui.cast_text.x = x, -1300, 10);
// }
// time_count = 0;
//Debug.Log($"barry broad time count======== {time_count}");
if (time_count > 20)
{
time_count = 0;
var name_index = Random.Range(0, config_name_list.Count);
var money_index = Random.Range(0, config_money_list.Count);
Debug.Log(text_ui.cast_text.text);
string name = config_name_list[name_index];
if (name.Length > 4)
{
name = name[..4] + "...";
}
// text_ui.hide_text.text = GameHelper.getDesByKey("makeup_4");
var money_text = GameHelper.getChString(decimal.Parse(config_money_list[money_index]));
string broad_text = String.Format(GameHelper.getDesByKey("makeup_4"), name, money_text, DateTimeManager.Instance.GetCurrDateTime());
text_ui.cast_text.text = broad_text;
ui.t0.Play();
DOVirtual.DelayedCall(3.5f, () =>
{
// Tweener tweener = DOTween.To(() => ui.broad.x,
// x => ui.broad.x = x, 1080, 0.5f);
ui.t1.Play();
});
string str = name + "-" + config_money_list[money_index] + "-" + DateTimeManager.Instance.GetCurrDateTime();
GameDispatcher.Instance.Dispatch(GameMsg.updateRecordList, str);
}
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d9a4125b4c0c64c94857a7ac85479526
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,72 @@
namespace ChillConnect
{
public class BroadcastUICtrl : BaseUICtrl
{
private BroadcastUI ui;
private BroadcastModel model;
private uint openUIMsg = UICtrlMsg.BroadcastUI_Open;
private uint closeUIMsg = UICtrlMsg.BroadcastUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.BroadcastModel) as BroadcastModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new BroadcastUI(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: 35a4fff4d50cc4404951bdbed6e43b22
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b3a59974b3d5f6d49b4e54ed7605922c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,42 @@
namespace ChillConnect
{
public class BuyPropCtrl : BaseCtrl
{
public static BuyPropCtrl Instance { get; private set; }
private BuyPropModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.BuyPropModel) as BuyPropModel;
}
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: 58e27508a01b144eab047fc0579e3520
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,43 @@
namespace ChillConnect
{
public class BuyPropModel : 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: 6f1d88ea5dfa34e1a927e5bef7f9c714
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,258 @@
using System;
using FGUI.Common_01;
using FGUI.Prop_09;
using FGUI.store_17;
using IgnoreOPS;
using UnityEngine;
namespace ChillConnect
{
public class BuyPropUI : BaseUI
{
private BuyPropUICtrl ctrl;
private BuyPropModel model;
private com_prop ui;
private int state_;
private int prop_num = 1;
private int _price;
public BuyPropUI(BuyPropUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.BuyPropUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "Prop_09";
uiInfo.assetName = "com_prop";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = true;
uiInfo.isNeedCloseAnim = true;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.BuyPropModel) as BuyPropModel;
}
protected override void OnClose()
{
GameHelper.showGameUI = true;
HallManager.Instance.UpdateSecondEvent -= UpdateCd;
}
protected override void OnBind()
{
ui = baseUI as com_prop;
}
protected override void OnOpenBefore(object args)
{
_price = ConfigSystem.GetConfig<CommonModel>().Purchaseprops;
state_ = (int)args;
ui.prop.selectedIndex = state_;
ui.btn_buy.SetClick(buyItem);
setBtnState(state_);
InitView();
setPropText();
SetAddText();
ui.btn_add.state.selectedIndex = 0;
ui.btn_jian.state.selectedIndex = 1;
ui.btn_add.SetClick(AddProNum);
ui.btn_jian.SetClick(ReduceProNum);
HallManager.Instance.UpdateSecondEvent += UpdateCd;
UpdateCd();
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) ui.img_saveingpot.visible = true;
ui.btn_watch.SetClick(() =>
{
buyItem();
});
}
void buyItem()
{
if (state_ == 0)
{
}
else if (state_ == 1)
{
}
else if (state_ == 2)
{
}
if (DataMgr.NewWatchCd.Value[state_ + 2] < Convert.ToInt32(GameHelper.GetNowTime()))
{
GameHelper.ShowVideoAd("reward_prop", isSuccess =>
{
if (isSuccess)
{
GameHelper.SetWatchCd(state_ + 2);
int numbers = GameHelper.GetItemNumber(state_);
numbers++;
GameHelper.SetItemNumber(state_, numbers);
GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
GameHelper.ShowTips("The purchase was successful", true);
CtrlCloseUI();
}
});
}
// int price = _price * prop_num;
// if (GameHelper.CheckGoldNumber(price))
// {
// GameHelper.AddGoldNumber(-price);
// int numbers = GameHelper.GetItemNumber(state_);
// numbers += prop_num;
// GameHelper.SetItemNumber(state_, numbers);
// GameDispatcher.Instance.Dispatch(GameMsg.Sheep_item_refresh);
// GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
// GameHelper.ShowTips("The purchase was successful", true);
//
// CtrlCloseUI();
//
// }
// else
// {
// GameHelper.ShowTips("Not enough gold");
// }
}
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 UpdateCd()
{
btn_watchAd btnWatch = ui.btn_watch as btn_watchAd;
// Debug.Log($"DataMgr.NewWatchCd.Value[state_ + 2]==={DataMgr.NewWatchCd.Value[state_ + 2]}");
if (DataMgr.NewWatchCd.Value[state_ + 2] > Convert.ToInt32(GameHelper.GetNowTime()))
{
btnWatch.enabled = false;
btnWatch.can_buy.selectedIndex = 1;
btnWatch.btn_text.text = CommonHelper.TimeFormat(DataMgr.NewWatchCd.Value[state_ + 2] - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
}
else
{
ui.btn_watch.enabled = true;
btnWatch.can_buy.selectedIndex = 0;
btnWatch.watch.text = "Watch AD";
}
}
private void AddProNum()
{
prop_num++;
SetAddText();
setPropText();
}
private void SetAddText()
{
ui.text_add.text = prop_num.ToString();
}
private void ReduceProNum()
{
prop_num--;
if (prop_num <= 1)
{
prop_num = 1;
}
setPropText();
SetAddText();
}
private void setPropText()
{
ui.btn_buy.GetChild("text_gold").text = GameHelper.Get101Str( _price * prop_num);
}
//初始化页面逻辑
private void InitView()
{
ui.btn_back.SetClick(() =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SheepwindowUI_Close);
});
// ui.btn_buy0.SetClick(() =>
// {
// state_ = 0;
// ui.prop.selectedIndex = 0;
// setBtnState(0);
// });
// ui.btn_buy1.SetClick(() =>
// {
// state_ = 1;
// ui.prop.selectedIndex = 1;
// setBtnState(1);
// });
// ui.btn_buy2.SetClick(() =>
// {
// state_ = 2;
// ui.prop.selectedIndex = 2;
// setBtnState(2);
// });
}
private void setBtnState(int index)
{
// ui.btn_buy0.tab_choose.selectedIndex = index == 0 ? 1 : 0;
// ui.btn_buy1.tab_choose.selectedIndex = index == 1 ? 1 : 0;
// ui.btn_buy2.tab_choose.selectedIndex = index == 2 ? 1 : 0;
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d07e071d35d5041feaf834faa7cac3a0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,71 @@
namespace ChillConnect
{
public class BuyPropUICtrl : BaseUICtrl
{
private BuyPropUI ui;
private BuyPropModel model;
private uint openUIMsg = UICtrlMsg.SheepwindowUI_Open;
private uint closeUIMsg = UICtrlMsg.SheepwindowUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.BuyPropModel) as BuyPropModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new BuyPropUI(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: b85f17625775040eb85b386d6c9c5c79
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cf8752ba62de0944699341c95ac0fdc8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,42 @@
namespace ChillConnect
{
public class ChoosePropCtrl : BaseCtrl
{
public static ChoosePropCtrl Instance { get; private set; }
private ChoosePropModel model;
#region
protected override void OnInit()
{
Instance = this;
//model = ModuleManager.Instance..GetModel(ModelConst.ChoosePropModel) as ChoosePropModel;
}
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: 30f4147b6a9f34f8a98d5bbc0a788e6d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,43 @@
namespace ChillConnect
{
public class ChoosePropModel : 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: 24f4458949b044bf5ad0e021638528e0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,206 @@
using FGUI.Prop_09;
using IgnoreOPS;
using UnityEngine;
namespace ChillConnect
{
public class ChoosePropUI : BaseUI
{
private ChoosePropUICtrl ctrl;
private ChoosePropModel model;
private com_choose ui;
public ChoosePropUI(ChoosePropUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.ChoosePropUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "Prop_09";
uiInfo.assetName = "com_choose";
uiInfo.layerType = UILayerType.Popup;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
}
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.ChoosePropModel) as ChoosePropModel;
}
protected override void OnClose()
{
}
protected override void OnBind()
{
ui = baseUI as com_choose;
}
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 void InitView()
{
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
{
ui.btn_ad.GetChild("img_saveingpot").visible = true;
}
// Debug.Log(GameHelper.GetLevelstate());
int state = GameHelper.GetLevelstate();
int need_gold = ConfigSystem.GetConfig<CommonModel>().RevivalCoins;
ui.btn_gold_buy.GetChild("text_gold").text = GameHelper.Get101Str(need_gold);
Debug.Log($"state===================:{state}");
initProp(state);
// ui.btn_thanks.SetClick(() =>
// {
// float[] cash_array = GameHelper.GetRewardValue(2);
// var temp = new SuccessData();
// temp.IsWin = false;
// temp.cash_number = cash_array[0];
// temp.IsLevelSuccess = true;
// temp.IsH5Reward = false;
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Open, temp);
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
// });
ui.btn_close.SetClick(() =>
{
clsoeFunc();
});
ui.btn_thanks.SetClick(() =>
{
clsoeFunc();
});
}
private static void clsoeFunc()
{
float[] cash_array = GameHelper.GetRewardValue(2);
var temp = new SuccessData();
temp.IsWin = false;
temp.cash_number = cash_array[0];
temp.IsLevelSuccess = true;
temp.IsH5Reward = false;
temp.boost_array = GameHelper.GetRewardBoost(2);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Open, temp);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
}
private void initProp(int state)
{
int need_gold = ConfigSystem.GetConfig<CommonModel>().RevivalCoins;
if (state == 3)
{
ui.state.selectedIndex = ui._State_all_;
ui.btn_ad.SetClick(() =>
{
GameHelper.ShowVideoAd("reward_lobby", isSuccess =>
{
if (isSuccess)
{
// GameHelper.SetLevelstate(1);
GameHelper.SetLevelstate(0);
GameDispatcher.Instance.Dispatch(GameMsg.Remake_state, true);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
}
});
});
ui.btn_gold_buy.SetClick(() =>
{
if (GameHelper.CheckGoldNumber(need_gold))
{
GameHelper.AddGoldNumber(-need_gold);
// GameHelper.SetLevelstate(2);
GameHelper.SetLevelstate(0);
GameDispatcher.Instance.Dispatch(GameMsg.Remake_state, true);
GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
}
else
{
GameHelper.ShowTips("Not enough gold");
}
});
}
else if (state == 2)
{
ui.state.selectedIndex = ui._State_ad;
ui.btn_ad.SetClick(() =>
{
GameHelper.ShowVideoAd("reward_lobby", isSuccess =>
{
if (isSuccess)
{
GameHelper.SetLevelstate(0);
GameDispatcher.Instance.Dispatch(GameMsg.Remake_state, true);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
}
});
});
}
else if (state == 1)
{
ui.state.selectedIndex = ui._State_gold;
ui.btn_gold_buy.SetClick(() =>
{
if (GameHelper.CheckGoldNumber(need_gold))
{
GameHelper.AddGoldNumber(-need_gold);
GameHelper.SetLevelstate(0);
GameDispatcher.Instance.Dispatch(GameMsg.Remake_state, true);
GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.ChoosePropUI_Close);
}
else
{
GameHelper.ShowTips("Not enough gold");
}
});
}
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 05d11be9302224ba99cc14d10974266f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,71 @@
namespace ChillConnect
{
public class ChoosePropUICtrl : BaseUICtrl
{
private ChoosePropUI ui;
private ChoosePropModel model;
private uint openUIMsg = UICtrlMsg.ChoosePropUI_Open;
private uint closeUIMsg = UICtrlMsg.ChoosePropUI_Close;
#region
protected override void OnInit()
{
//model = ModuleManager.Instance.GetModel(ModelConst.ChoosePropModel) as ChoosePropModel;
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null)
{
ui = new ChoosePropUI(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: d012c092edd6c41a2bbbed3c72ca2bfe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b05bab87ee5860d45b1e0e643cda6b64
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 88b71acc77eae444ca3b0a7275fa9c88
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,44 @@
namespace ChillConnect
{
public class FXWndCtrl : BaseCtrl
{
public static FXWndCtrl Instance { get; private set; }
private FXWndModel model;
#region
protected override void OnInit()
{
Instance = this;
}
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,3 @@
fileFormatVersion: 2
guid: 4ba389480d8644e5bb9fae2d8eb324f0
timeCreated: 1671086538
@@ -0,0 +1,51 @@
namespace ChillConnect
{
public class FXWndModel : 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,3 @@
fileFormatVersion: 2
guid: c48389d259bf411e80143844af2b2591
timeCreated: 1671086538
+192
View File
@@ -0,0 +1,192 @@
using System;
using DG.Tweening;
using FairyGUI;
using FGUI.Fx_502;
using Spine.Unity;
using UnityEngine;
namespace ChillConnect
{
public class FXWndUI : BaseUI
{
private FXWndUICtrl ctrl;
private FXWndModel model;
private com_FX ui;
private Transform parTrf;
public FXWndUI(FXWndUICtrl ctrl) : base(ctrl)
{
uiName = UIConst.FXWndUI;
this.ctrl = ctrl;
}
protected override void SetUIInfo(UIInfo uiInfo)
{
uiInfo.packageName = "Fx_502";
uiInfo.assetName = "com_FX";
uiInfo.layerType = UILayerType.Animation;
}
public void PlayFx(FxPlayData fxPlayData)
{
FxPlayData data = fxPlayData;
GameObject arg = null;
Transform trf = null;
Action recFx = null;
if (data.isParticleSystem)
{
ParticleSystem system = FXManager.Instance.GetFx<ParticleSystem>(data.fxType);
system.Play();
arg = system.gameObject;
trf = system.transform;
recFx = delegate { FXManager.Instance.RecFx(data.fxType, system); };
}
else
{
SkeletonAnimation system = FXManager.Instance.GetFx<SkeletonAnimation>(data.fxType);
trf = system.transform;
arg = system.gameObject;
recFx = delegate { FXManager.Instance.RecFx(data.fxType, system); };
}
trf.SetParent(parTrf);
arg.SetLayer("UI");
Action cb = SetSortingOrder(arg);
data.endEvent += e => cb?.Invoke();
Vector3 startPot = GameHelper.FguiPotToUnityTrfLocalPot(data.startPot);
trf.localPosition = startPot;
trf.localScale = Vector3.one * data.size;
trf.localEulerAngles = Vector3.zero;
fxPlayData.startEvent?.Invoke(arg);
DOVirtual.DelayedCall(data.duration, () =>
{
data.endEvent?.Invoke(arg);
recFx?.Invoke();
FxPlayData.Release(data);
});
}
private Action SetSortingOrder(GameObject obj)
{
Action action = null;
Renderer[] renders = obj.GetComponentsInChildren<Renderer>();
foreach (Renderer render in renders)
{
if (render != null)
{
render.sortingOrder += 300;
action += () => { render.sortingOrder -= 300; };
}
}
return action;
}
#region
protected override void OnInit()
{
}
protected override void OnClose()
{
}
protected override void OnBind()
{
ui = baseUI as com_FX;
}
protected override void OnOpenBefore(object args)
{
parTrf = ui.displayObject.cachedTransform;
}
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
}
public class FxPlayData
{
private static ObjectPool<FxPlayData> _Pool = new ObjectPool<FxPlayData>();
public static FxPlayData Get(Fx_Type fx_Type, float _duration, Vector2 _pot)
{
FxPlayData data = _Pool.Get();
if (_pot == Vector2.zero)
{
data.startPot = GRoot.inst.size / 2;
}
else
{
data.startPot = _pot;
}
if (_duration == 0)
{
data.duration = 1;
}
else
{
data.duration = _duration;
}
data.fxType = fx_Type;
return data;
}
public static void Release(FxPlayData data)
{
data.duration = 0;
data.startEvent = null;
data.endEvent = null;
data.isParticleSystem = true;
data.startPot = Vector2.zero;
_Pool.Release(data);
}
public float duration;
public Fx_Type fxType;
public bool isParticleSystem = true;
public Vector2 startPot;
public Action<GameObject> startEvent;
public Action<GameObject> endEvent;
public int size = 100;
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 57addc9545404bc9b81d1ffbe0d02508
timeCreated: 1671086538
@@ -0,0 +1,95 @@
namespace ChillConnect
{
public class FXWndUICtrl : BaseUICtrl
{
private FXWndUI ui;
private FXWndModel model;
private uint openUIMsg = UICtrlMsg.FXWndUI_Open;
private uint closeUIMsg = UICtrlMsg.FXWndUI_Close;
private bool isOpen = false;
#region
protected override void OnInit()
{
}
protected override void OnDispose()
{
}
public override void OpenUI(object args = null)
{
if (ui == null || ui.isClose)
{
ui = new FXWndUI(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(UICtrlMsg.PlayUIFX, PlayFx);
}
protected override void RemoveListener()
{
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
uiCtrlDispatcher.RemoveListener(UICtrlMsg.PlayUIFX, PlayFx);
}
private void PlayFx(object obj)
{
if (!isOpen)
{
OpenUI();
}
FxPlayData fxType = (FxPlayData)obj;
ui.PlayFx(fxType);
}
protected override void AddServerListener()
{
}
protected override void RemoveServerListener()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e43875b511c04a81a511ab1a4bdb6c5c
timeCreated: 1671086538

Some files were not shown because too many files have changed in this diff Show More