fix:1、添加项目。2、基本箭头生成
This commit is contained in:
@@ -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:
|
||||
@@ -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:
|
||||
@@ -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:
|
||||
@@ -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:
|
||||
@@ -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
|
||||
@@ -0,0 +1,489 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using FairyGUI;
|
||||
using FGUI.Arrow_game;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class ArrowGameUI : BaseUI
|
||||
{
|
||||
private ArrowGameUICtrl ctrl;
|
||||
private com_arrow_game ui;
|
||||
|
||||
// FGUI界面根容器
|
||||
private GComponent _viewContainer;
|
||||
|
||||
#region FGUI 模板引用
|
||||
private ArrorPoint _dotTemplate;
|
||||
private ArrowEnd _arrowTemplate;
|
||||
private LineTile _lineUnitTemplate;
|
||||
#endregion
|
||||
|
||||
// 关卡总配置数据
|
||||
private LevelConfig _levelConfig;
|
||||
|
||||
// 全局固定参数
|
||||
private const float _pointSpacing = 60f; // 点位间距 60px
|
||||
private const float _moveSpeed = 120f; // 移动速度
|
||||
|
||||
public ArrowGameUI(ArrowGameUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.ArrowGameUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "Arrow_game";
|
||||
uiInfo.assetName = "com_arrow_game";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
// 销毁所有动态FGUI对象
|
||||
ClearAllDynamicObj();
|
||||
|
||||
// 释放模板资源
|
||||
if (_dotTemplate != null) _dotTemplate.Dispose();
|
||||
if (_arrowTemplate != null) _arrowTemplate.Dispose();
|
||||
if (_lineUnitTemplate != null) _lineUnitTemplate.Dispose();
|
||||
|
||||
_dotTemplate = null;
|
||||
_arrowTemplate = null;
|
||||
_lineUnitTemplate = null;
|
||||
_levelConfig = null;
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as com_arrow_game;
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
if (_levelConfig == null) return;
|
||||
foreach (var arrow in _levelConfig.arrows)
|
||||
{
|
||||
UpdateArrowMove(arrow);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
_viewContainer = ui.view_container;
|
||||
// 初始化FGUI模板
|
||||
_dotTemplate = (ArrorPoint)UIPackage.CreateObject("Arrow_game", "ArrorPoint");
|
||||
_arrowTemplate = (ArrowEnd)UIPackage.CreateObject("Arrow_game", "ArrowEnd");
|
||||
_lineUnitTemplate = (LineTile)UIPackage.CreateObject("Arrow_game", "LineTile");
|
||||
LoadLevelConfig();
|
||||
InitView();
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args) { }
|
||||
protected override void OnHide() { }
|
||||
protected override void OnDisplay(object args) { }
|
||||
#endregion
|
||||
|
||||
#region 页面初始化 & 关闭按钮
|
||||
private void InitView()
|
||||
{
|
||||
// 关闭按钮
|
||||
ui.btn_close.SetClick(() =>
|
||||
{
|
||||
CtrlCloseUI();
|
||||
});
|
||||
|
||||
if (_levelConfig == null) return;
|
||||
|
||||
// 1. 以 ui.point 为原点生成整张网格圆点
|
||||
DrawGridDots(_levelConfig);
|
||||
|
||||
// 2. 初始化所有箭头 + 路径线条
|
||||
foreach (var arrow in _levelConfig.arrows)
|
||||
{
|
||||
BuildArrowPath(arrow, _levelConfig);
|
||||
CreateArrowAndLines(arrow, _levelConfig);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 配置加载
|
||||
private void LoadLevelConfig()
|
||||
{
|
||||
_levelConfig = JsonHelper.LoadLevel("level_1001.json");
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 【核心】网格坐标工具(基于 ui.point 为原点)
|
||||
/// <summary>点位ID 转 行列索引</summary>
|
||||
private void PointIdToRowCol(int pointId, int totalCol, out int row, out int col)
|
||||
{
|
||||
row = pointId / totalCol;
|
||||
col = pointId % totalCol;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 行列 → 实际像素坐标
|
||||
/// 原点 = ui.point 组件坐标,向右+X,向下+Y,间距固定60
|
||||
/// </summary>
|
||||
private Vector2 RowColToPos(int row, int col)
|
||||
{
|
||||
// 取UI上point组件的坐标作为网格原点
|
||||
float originX = ui.point.x;
|
||||
float originY = ui.point.y;
|
||||
|
||||
float x = originX + col * _levelConfig.pointSpacing;
|
||||
float y = originY + row * _levelConfig.pointSpacing;
|
||||
return new Vector2(x, y);
|
||||
}
|
||||
|
||||
/// <summary>点位ID → 最终像素坐标</summary>
|
||||
private Vector2 PointIdToPos(int pointId, int totalCol)
|
||||
{
|
||||
PointIdToRowCol(pointId, totalCol, out int r, out int c);
|
||||
return RowColToPos(r, c);
|
||||
}
|
||||
|
||||
/// <summary>方向转旋转角度(箭头默认朝上)</summary>
|
||||
private float DirToRotation(string dir)
|
||||
{
|
||||
return dir switch
|
||||
{
|
||||
"up" => 0f,
|
||||
"right" => 90f,
|
||||
"down" => 180f,
|
||||
"left" => 270f,
|
||||
_ => 0f
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 绘制网格圆点(以 ui.point 为起点)
|
||||
private void DrawGridDots(LevelConfig cfg)
|
||||
{
|
||||
if (_dotTemplate == null || _viewContainer == null) return;
|
||||
_dotTemplate.visible = false;
|
||||
|
||||
var rows = cfg.gridRows;
|
||||
var cols = cfg.gridCols;
|
||||
|
||||
for (var r = 0; r < rows; r++)
|
||||
{
|
||||
for (var c = 0; c < cols; c++)
|
||||
{
|
||||
var dot = ArrorPoint.CreateInstance();
|
||||
var pos = RowColToPos(r, c);
|
||||
dot.SetPosition(pos.x, pos.y,0);
|
||||
_viewContainer.AddChild(dot);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 构建箭头路径点位
|
||||
private void BuildArrowPath(ArrowConfig arrow, LevelConfig cfg)
|
||||
{
|
||||
arrow.pathPointList = new List<Vector2>();
|
||||
int totalCol = cfg.gridCols;
|
||||
|
||||
int curPointId = arrow.startPoint;
|
||||
Vector2 curPos = PointIdToPos(curPointId, totalCol);
|
||||
arrow.pathPointList.Add(curPos);
|
||||
|
||||
foreach (string dir in arrow.path)
|
||||
{
|
||||
PointIdToRowCol(curPointId, totalCol, out int r, out int c);
|
||||
switch (dir)
|
||||
{
|
||||
case "up": r--; break;
|
||||
case "down": r++; break;
|
||||
case "left": c--; break;
|
||||
case "right": c++; break;
|
||||
}
|
||||
curPointId = r * totalCol + c;
|
||||
curPos = PointIdToPos(curPointId, totalCol);
|
||||
arrow.pathPointList.Add(curPos);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 创建箭头 + 线条方块
|
||||
private void CreateArrowAndLines(ArrowConfig arrow, LevelConfig cfg)
|
||||
{
|
||||
arrow.lineUnits = new List<GComponent>();
|
||||
List<Vector2> path = arrow.pathPointList;
|
||||
|
||||
if (path.Count < 2)
|
||||
{
|
||||
CreateArrowOnly(arrow, path[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
ColorUtility.TryParseHtmlString(arrow.color, out Color lineColor);
|
||||
List<Vector2> allTilePositions = new List<Vector2>();
|
||||
|
||||
// 关键:直接用 path 数组判断方向,和配置表完全一致
|
||||
for (int i = 0; i < path.Count - 1; i++)
|
||||
{
|
||||
Vector2 pStart = path[i];
|
||||
Vector2 pEnd = path[i + 1];
|
||||
string dir = arrow.path[i]; // 直接从配置里取方向
|
||||
|
||||
float offsetX = 0f;
|
||||
float offsetY = 0f;
|
||||
|
||||
// 严格按 path 方向设置步长
|
||||
switch (dir)
|
||||
{
|
||||
case "right":
|
||||
offsetX = 10f;
|
||||
break;
|
||||
case "left":
|
||||
offsetX = -10f;
|
||||
break;
|
||||
case "down":
|
||||
offsetY = 10f;
|
||||
break;
|
||||
case "up":
|
||||
offsetY = -10f;
|
||||
break;
|
||||
}
|
||||
|
||||
Vector2 curPos = pStart;
|
||||
// 生成6个方块,从pStart一直覆盖到pEnd
|
||||
for (int k = 0; k < 6; k++)
|
||||
{
|
||||
allTilePositions.Add(curPos);
|
||||
curPos.x += offsetX;
|
||||
curPos.y += offsetY;
|
||||
}
|
||||
}
|
||||
|
||||
// 移除最后一个点(终点位置的方块,避免挡住箭头)
|
||||
if (allTilePositions.Count > 0)
|
||||
{
|
||||
allTilePositions.RemoveAt(allTilePositions.Count - 1);
|
||||
}
|
||||
|
||||
// 创建所有方块
|
||||
foreach (var pos in allTilePositions)
|
||||
{
|
||||
LineTile unit = LineTile.CreateInstance();
|
||||
unit.SetPosition(pos.x, pos.y, 0);
|
||||
unit.GetChild("line").asGraph.color = lineColor;
|
||||
unit.visible = true;
|
||||
|
||||
_viewContainer.AddChild(unit);
|
||||
arrow.lineUnits.Add(unit);
|
||||
}
|
||||
|
||||
// 创建箭头
|
||||
CreateArrowOnly(arrow, path[path.Count - 1]);
|
||||
}
|
||||
|
||||
private void CreateArrowOnly(ArrowConfig arrow, Vector2 arrowPos)
|
||||
{
|
||||
ArrowEnd arrowIns = ArrowEnd.CreateInstance();
|
||||
arrowIns.SetPosition(arrowPos.x, arrowPos.y, 0);
|
||||
|
||||
if (arrow.path.Count > 0)
|
||||
{
|
||||
string lastDir = arrow.path[arrow.path.Count - 1];
|
||||
arrowIns.rotation = DirToRotation(lastDir);
|
||||
}
|
||||
|
||||
if (ColorUtility.TryParseHtmlString(arrow.color, out Color arrowColor))
|
||||
{
|
||||
GImage icon = arrowIns.GetChild("icon").asImage;
|
||||
if (icon != null) icon.color = arrowColor;
|
||||
}
|
||||
|
||||
arrowIns.visible = true;
|
||||
_viewContainer.AddChild(arrowIns);
|
||||
arrowIns.onClick.Add(() => OnArrowClick(arrow));
|
||||
arrow.arrowObj = arrowIns;
|
||||
|
||||
arrow.isMoving = false;
|
||||
arrow.targetIndex = arrow.pathPointList.Count - 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 两点间距60px,使用10x10方块,生成6个,完整铺满从pStart到pEnd的线段。
|
||||
/// 关键:覆盖完整区间,保证拐点无缝衔接。
|
||||
/// </summary>
|
||||
private void CreateLineUnitBetweenTwoPoint(Vector2 pStart, Vector2 pEnd, Color lineColor, List<GComponent> lineList)
|
||||
{
|
||||
if (_lineUnitTemplate == null) return;
|
||||
|
||||
float offsetX = 0f;
|
||||
float offsetY = 0f;
|
||||
|
||||
// 判断方向
|
||||
if (Mathf.Abs(pEnd.x - pStart.x) > 1f)
|
||||
{
|
||||
offsetX = 10f;
|
||||
}
|
||||
else
|
||||
{
|
||||
offsetY = 10f;
|
||||
}
|
||||
|
||||
Vector2 curPos = pStart;
|
||||
// 循环6次,生成6个方块,从pStart一直覆盖到pEnd
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
LineTile unit = LineTile.CreateInstance();
|
||||
unit.SetPosition(curPos.x, curPos.y, 0);
|
||||
unit.GetChild("line").asGraph.color = lineColor;
|
||||
unit.visible = true;
|
||||
|
||||
_viewContainer.AddChild(unit);
|
||||
lineList.Add(unit);
|
||||
|
||||
curPos.x += offsetX;
|
||||
curPos.y += offsetY;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 点击 & 移动逻辑
|
||||
private void OnArrowClick(ArrowConfig arrow)
|
||||
{
|
||||
if (arrow.isMoving) return;
|
||||
arrow.isMoving = true;
|
||||
}
|
||||
|
||||
private void UpdateArrowMove(ArrowConfig arrow)
|
||||
{
|
||||
if (!arrow.isMoving) return;
|
||||
List<Vector2> path = arrow.pathPointList;
|
||||
|
||||
// 全部走完,隐藏对象
|
||||
if (arrow.targetIndex < 0)
|
||||
{
|
||||
arrow.isMoving = false;
|
||||
arrow.arrowObj.visible = false;
|
||||
foreach (var line in arrow.lineUnits) line.visible = false;
|
||||
return;
|
||||
}
|
||||
|
||||
Vector2 targetPos = path[arrow.targetIndex];
|
||||
Vector2 curPos = new Vector2(arrow.arrowObj.x, arrow.arrowObj.y);
|
||||
float distance = Vector2.Distance(curPos, targetPos);
|
||||
|
||||
// 到达当前点位,切换下一个目标
|
||||
if (distance < 2f)
|
||||
{
|
||||
arrow.targetIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 向目标移动
|
||||
Vector2 dir = (targetPos - curPos).normalized;
|
||||
Vector2 newPos = curPos + dir * _moveSpeed * Time.deltaTime;
|
||||
arrow.arrowObj.SetPosition(newPos.x, newPos.y,0);
|
||||
}
|
||||
|
||||
// 刷新线条显隐
|
||||
RefreshLineVisible(arrow);
|
||||
}
|
||||
|
||||
/// <summary>逐段控制显隐,每段固定6个方块</summary>
|
||||
private void RefreshLineVisible(ArrowConfig arrow)
|
||||
{
|
||||
int segIndex = 0;
|
||||
int totalSeg = arrow.pathPointList.Count - 1;
|
||||
|
||||
for (int s = 0; s < totalSeg; s++)
|
||||
{
|
||||
bool isShow = s < arrow.targetIndex;
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
arrow.lineUnits[segIndex + i].visible = isShow;
|
||||
}
|
||||
segIndex += 6;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 资源清理
|
||||
private void ClearAllDynamicObj()
|
||||
{
|
||||
if (_levelConfig == null || _viewContainer == null) return;
|
||||
foreach (var arrow in _levelConfig.arrows)
|
||||
{
|
||||
if (arrow.arrowObj != null)
|
||||
{
|
||||
_viewContainer.RemoveChild(arrow.arrowObj);
|
||||
arrow.arrowObj.Dispose();
|
||||
arrow.arrowObj = null;
|
||||
}
|
||||
|
||||
foreach (var line in arrow.lineUnits)
|
||||
{
|
||||
_viewContainer.RemoveChild(line);
|
||||
line.Dispose();
|
||||
}
|
||||
arrow.lineUnits.Clear();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息监听
|
||||
protected override void AddListener() { }
|
||||
protected override void RemoveListener() { }
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region 配置解析 & 数据结构(完全保留不变)
|
||||
public static class JsonHelper
|
||||
{
|
||||
public static LevelConfig LoadLevel(string fileName)
|
||||
{
|
||||
string path = Path.Combine(Application.streamingAssetsPath, fileName);
|
||||
return JsonUtility.FromJson<LevelConfig>(File.ReadAllText(path));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 配置解析 & 数据结构(保留原有定义)
|
||||
[System.Serializable]
|
||||
public class LevelConfig
|
||||
{
|
||||
public int levelId;
|
||||
public string levelName;
|
||||
public int gridRows;
|
||||
public int gridCols;
|
||||
public int pointSpacing; // 配置内此字段仅保留兼容,实际间距以代码 60px 为准
|
||||
public List<ArrowConfig> arrows;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class ArrowConfig
|
||||
{
|
||||
public int id;
|
||||
public int startPoint;
|
||||
public int endPoint;
|
||||
public string color;
|
||||
public List<string> path;
|
||||
|
||||
// 运行时数据
|
||||
public List<Vector2> pathPointList; // 整条路径所有点位坐标
|
||||
public GComponent arrowObj;
|
||||
public List<GComponent> lineUnits; // 所有线条方块预制体
|
||||
public bool isMoving;
|
||||
public int targetIndex;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -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
|
||||
@@ -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:
|
||||
@@ -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:
|
||||
@@ -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:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a76f72334f97ad4983e911484830546
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class FAQCtrl : BaseCtrl
|
||||
{
|
||||
public static FAQCtrl Instance { get; private set; }
|
||||
|
||||
private FAQModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.FAQModel) as FAQModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 141317c3032f4463da09be3c37e26ba8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class FAQModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83f9eb69747b240dcb54855ff322ac86
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,241 @@
|
||||
using System.Collections.Generic;
|
||||
using FairyGUI;
|
||||
using FGUI.Lobby_03;
|
||||
using IgnoreOPS;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class FAQUI : BaseUI
|
||||
{
|
||||
private FAQUICtrl ctrl;
|
||||
private FAQModel model;
|
||||
private com_faq ui;
|
||||
|
||||
public FAQUI(FAQUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.FAQUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "Lobby_03";
|
||||
uiInfo.assetName = "com_faq";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.FAQModel) as FAQModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as com_faq;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
|
||||
if (GameHelper.isRDExchangeMode())
|
||||
{
|
||||
rule_list = ConfigSystem.GetConfig<FAQRuleModel1>().DataList;
|
||||
message_list = ConfigSystem.GetConfig<MessageBoardModel>().DataList;
|
||||
}
|
||||
else
|
||||
{
|
||||
rule_list = ConfigSystem.GetConfig<FAQRuleModel>().DataList;
|
||||
message_list = ConfigSystem.GetConfig<MessageBoardModel>().DataList;
|
||||
}
|
||||
|
||||
InitView();
|
||||
}
|
||||
private List<FAQRule> rule_list;
|
||||
private List<MessageBoard> message_list;
|
||||
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.faq_refresh, refreshList);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.faq_refresh, refreshList);
|
||||
}
|
||||
#endregion
|
||||
void refreshList(object a)
|
||||
{
|
||||
com_msg com_msg = (com_msg)UIPackage.CreateObject("Lobby_03", "com_msg");
|
||||
com_msg.text_msg.text = list_user_arr[list_user_arr.Count - 1] + ":" + list_content_arr[list_content_arr.Count - 1];
|
||||
|
||||
ui.list_msg.AddChild(com_msg);
|
||||
ui.list_msg.scrollPane.ScrollDown(500, false);
|
||||
}
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
ui.btn_close.SetClick(CtrlCloseUI);
|
||||
for (int i = 0; i < rule_list.Count; i++)
|
||||
{
|
||||
com_question question = (com_question)UIPackage.CreateObject("Lobby_03", "com_question");
|
||||
question.text_question.text = (i + 1) + "." + rule_list[i].Rule;
|
||||
if (question.text_question.width > 730)
|
||||
{
|
||||
question.text_question.autoSize = AutoSizeType.Shrink;
|
||||
question.text_question.width = 730;
|
||||
}
|
||||
ui.list_faq.AddChild(question);
|
||||
for (int j = 0; j < 4; j++)
|
||||
{
|
||||
if (j == 0)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(rule_list[i].Information1))
|
||||
{
|
||||
com_answer anster = (com_answer)UIPackage.CreateObject("Lobby_03", "com_answer");
|
||||
anster.text_answer.text = rule_list[i].Information1;
|
||||
ui.list_faq.AddChild(anster);
|
||||
}
|
||||
}
|
||||
else if (j == 1)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(rule_list[i].Information2))
|
||||
{
|
||||
com_answer anster = (com_answer)UIPackage.CreateObject("Lobby_03", "com_answer");
|
||||
anster.text_answer.text = rule_list[i].Information2;
|
||||
ui.list_faq.AddChild(anster);
|
||||
}
|
||||
}
|
||||
else if (j == 2)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(rule_list[i].Information3))
|
||||
{
|
||||
com_answer anster = (com_answer)UIPackage.CreateObject("Lobby_03", "com_answer");
|
||||
anster.text_answer.text = rule_list[i].Information3;
|
||||
ui.list_faq.AddChild(anster);
|
||||
}
|
||||
}
|
||||
else if (j == 3)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(rule_list[i].Information4))
|
||||
{
|
||||
com_answer anster = (com_answer)UIPackage.CreateObject("Lobby_03", "com_answer");
|
||||
anster.text_answer.text = rule_list[i].Information4;
|
||||
ui.list_faq.AddChild(anster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (user_arr == null) //第一次显示
|
||||
{
|
||||
user_arr = message_list[0].user_name.Split(",");
|
||||
int user_index = PlayerPrefs.GetInt("user_index", 0);
|
||||
if (user_index + 10 >= user_arr.Length) user_index = 0;
|
||||
|
||||
|
||||
content_arr = message_list[0].message.Split(",");
|
||||
int faq_index = PlayerPrefs.GetInt("faq_index", 0);
|
||||
if (faq_index + 10 >= content_arr.Length) faq_index = 0;
|
||||
|
||||
|
||||
for (int i = user_index; i < user_index + 10; i++)
|
||||
{
|
||||
list_user_arr.Add(user_arr[i]);
|
||||
}
|
||||
for (int i = faq_index; i < faq_index + 10; i++)
|
||||
{
|
||||
list_content_arr.Add(content_arr[i]);
|
||||
}
|
||||
if (PlayerPrefs.GetInt("user_FAQindex", 0) < 10)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(PlayerPrefs.GetString("user_FAQcontent", "")))
|
||||
{
|
||||
list_user_arr.Insert(10 - PlayerPrefs.GetInt("user_FAQindex", 0), DataMgr.PlayerName.Value);
|
||||
list_content_arr.Insert(10 - PlayerPrefs.GetInt("user_FAQindex", 0), PlayerPrefs.GetString("user_FAQcontent", ""));
|
||||
}
|
||||
}
|
||||
user_index += 10;
|
||||
faq_index += 10;
|
||||
PlayerPrefs.SetInt("user_index", user_index);
|
||||
PlayerPrefs.SetInt("faq_index", faq_index);
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (int i = 0; i < list_user_arr.Count; i++)
|
||||
{
|
||||
com_msg com_msg = (com_msg)UIPackage.CreateObject("Lobby_03", "com_msg");
|
||||
com_msg.text_msg.text = list_user_arr[i] + ":" + list_content_arr[i];
|
||||
ui.list_msg.AddChild(com_msg);
|
||||
}
|
||||
|
||||
ui.btn_send.SetClick(() =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(ui.input_msg.text))
|
||||
{
|
||||
GameHelper.ShowTips("Please enter your message!");
|
||||
return;
|
||||
}
|
||||
Debug.Log(ui.input_msg.text);
|
||||
com_msg com_msg = (com_msg)UIPackage.CreateObject("Lobby_03", "com_msg");
|
||||
com_msg.text_msg.text = DataMgr.PlayerName.Value + ":" + ui.input_msg.text;
|
||||
list_user_arr.Add(DataMgr.PlayerName.Value);
|
||||
list_content_arr.Add(ui.input_msg.text);
|
||||
PlayerPrefs.SetInt("faq_time", (int)GameHelper.GetNowTime());
|
||||
PlayerPrefs.SetInt("user_FAQindex", 0);
|
||||
PlayerPrefs.SetString("user_FAQcontent", ui.input_msg.text);
|
||||
|
||||
ui.input_msg.text = "";
|
||||
ui.input_msg.promptText = "[color=#999999][size=40]Can only send once every hour[/size][/color]";
|
||||
ui.input_msg.touchable = false;
|
||||
ui.btn_send.SetClick(() => { });
|
||||
ui.list_msg.AddChild(com_msg);
|
||||
ui.list_msg.scrollPane.ScrollDown(500, false);
|
||||
|
||||
ui.btn_send.grayed = true;
|
||||
ui.input_bg.grayed = true;
|
||||
|
||||
});
|
||||
ui.list_msg.scrollPane.ScrollDown(1000, false);
|
||||
if (PlayerPrefs.GetInt("faq_time", 0) + 3600 > GameHelper.GetNowTime())
|
||||
{
|
||||
ui.input_msg.promptText = "[color=#999999][size=40]Can only send once every hour[/size][/color]";
|
||||
ui.input_msg.touchable = false;
|
||||
ui.btn_send.SetClick(() => { });
|
||||
ui.btn_send.grayed = true;
|
||||
ui.input_bg.grayed = true;
|
||||
}
|
||||
|
||||
ui.btn_contactus.SetClick(() => { GameHelper.OpenEmail(); });
|
||||
}
|
||||
|
||||
public static string[] user_arr;
|
||||
public static string[] content_arr;
|
||||
|
||||
public static List<string> list_user_arr = new List<string>();
|
||||
public static List<string> list_content_arr = new List<string>();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a9bee451b15a47eaaa4a44e93ccba93
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,156 @@
|
||||
using System.Collections.Generic;
|
||||
using IgnoreOPS;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class FAQUICtrl : BaseUICtrl
|
||||
{
|
||||
private FAQUI ui;
|
||||
private FAQModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.FAQUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.FAQUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.FAQModel) as FAQModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new FAQUI(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);
|
||||
HallManager.Instance.UpdateSecondEvent += timeEvent;
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
}
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveServerListener()
|
||||
{
|
||||
|
||||
}
|
||||
private int time;
|
||||
private int refresh_time=5;
|
||||
void timeEvent()
|
||||
{
|
||||
time++;
|
||||
// Debug.Log((int)GameHelper.GetNowTime());
|
||||
if (FAQUI.user_arr == null&&time > refresh_time) //第一次显示
|
||||
{
|
||||
List<MessageBoard> message_list = ConfigSystem.GetConfig<MessageBoardModel>().DataList;
|
||||
FAQUI.user_arr = message_list[0].user_name.Split(",");
|
||||
int user_index = PlayerPrefs.GetInt("user_index", 0);
|
||||
if (user_index + 10 >= FAQUI.user_arr.Length) user_index = 0;
|
||||
|
||||
|
||||
FAQUI.content_arr = message_list[0].message.Split(",");
|
||||
int faq_index = PlayerPrefs.GetInt("faq_index", 0);
|
||||
if (faq_index + 10 >= FAQUI.content_arr.Length) faq_index = 0;
|
||||
|
||||
|
||||
for (int i = user_index; i < user_index + 10; i++)
|
||||
{
|
||||
FAQUI.list_user_arr.Add(FAQUI.user_arr[i]);
|
||||
}
|
||||
for (int i = faq_index; i < faq_index + 10; i++)
|
||||
{
|
||||
FAQUI.list_content_arr.Add(FAQUI.content_arr[i]);
|
||||
}
|
||||
if (PlayerPrefs.GetInt("user_FAQindex", 0) < 10)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(PlayerPrefs.GetString("user_FAQcontent", "")))
|
||||
{
|
||||
FAQUI.list_user_arr.Insert(10 - PlayerPrefs.GetInt("user_FAQindex", 0), DataMgr.PlayerName.Value);
|
||||
FAQUI.list_content_arr.Insert(10 - PlayerPrefs.GetInt("user_FAQindex", 0), PlayerPrefs.GetString("user_FAQcontent", ""));
|
||||
}
|
||||
}
|
||||
user_index += 10;
|
||||
faq_index += 10;
|
||||
PlayerPrefs.SetInt("user_index", user_index);
|
||||
PlayerPrefs.SetInt("faq_index", faq_index);
|
||||
}
|
||||
|
||||
if (time > refresh_time)
|
||||
{
|
||||
|
||||
time = 0;
|
||||
|
||||
int user_index = PlayerPrefs.GetInt("user_index", 0);
|
||||
Debug.Log(user_index);
|
||||
Debug.Log(FAQUI.user_arr);
|
||||
Debug.Log(FAQUI.user_arr.Length);
|
||||
|
||||
if (user_index + 1 >= FAQUI.user_arr.Length) user_index = 0;
|
||||
|
||||
|
||||
|
||||
int faq_index = PlayerPrefs.GetInt("faq_index", 0);
|
||||
if (faq_index + 1 >= FAQUI.content_arr.Length) faq_index = 0;
|
||||
|
||||
|
||||
FAQUI.list_user_arr.Add(FAQUI.user_arr[user_index]);
|
||||
FAQUI.list_content_arr.Add(FAQUI.content_arr[faq_index]);
|
||||
if (FAQUI.list_user_arr.Count > 50)
|
||||
{
|
||||
FAQUI.list_user_arr.RemoveAt(0);
|
||||
}
|
||||
if (FAQUI.list_content_arr.Count > 50)
|
||||
{
|
||||
FAQUI.list_content_arr.RemoveAt(0);
|
||||
}
|
||||
user_index++;
|
||||
faq_index++;
|
||||
PlayerPrefs.SetInt("user_FAQindex", PlayerPrefs.GetInt("user_FAQindex", 0) + 1);
|
||||
PlayerPrefs.SetInt("user_index", user_index);
|
||||
PlayerPrefs.SetInt("faq_index", faq_index);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.faq_refresh);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c21a94c563a4b4e1f8aebe5935b398c0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2dd5ebd2b13cd734dbeea90106099ff7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,42 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class FirstRewardCtrl : BaseCtrl
|
||||
{
|
||||
public static FirstRewardCtrl Instance { get; private set; }
|
||||
|
||||
private FirstRewardModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.FirstRewardModel) as FirstRewardModel;
|
||||
}
|
||||
|
||||
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: 2b10e7a12f76b4e9c9389034c3bcee2c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,43 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class FirstRewardModel : 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: 139c7e95f3a174f9f996d4aaf7465f2c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,156 @@
|
||||
using System;
|
||||
using DG.Tweening;
|
||||
using FGUI.Lobby_03;
|
||||
using IgnoreOPS;
|
||||
using Spine.Unity;
|
||||
using UnityEngine;
|
||||
// using FGUI.G002_main;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class FirstRewardUI : BaseUI
|
||||
{
|
||||
private FirstRewardUICtrl ctrl;
|
||||
private FirstRewardModel model;
|
||||
private com_first_award ui;
|
||||
private Action closeCallback;
|
||||
private Action open_sign;
|
||||
private bool is_get;
|
||||
public FirstRewardUI(FirstRewardUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.FirstRewardUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "Lobby_03";
|
||||
uiInfo.assetName = "com_first_award";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
model = ModuleManager.Instance.GetModel(ModelConst.FirstRewardModel) as FirstRewardModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
closeCallback();
|
||||
//open_sign();
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as com_first_award;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
ui.end_point.y += 68;
|
||||
}
|
||||
InitView();
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
{
|
||||
//open_sign = (System.Action)args;
|
||||
}
|
||||
|
||||
protected override void OnHide()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDisplay(object args)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 消息
|
||||
protected override void AddListener()
|
||||
{
|
||||
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
//ui.money.GetChild("text_gold").text = $"{DataMgr.Coin.Value:N0}";
|
||||
|
||||
ui.text_num.text = GameHelper.Get102Str(ConfigSystem.GetConfig<CommonModel>().InitialNum);
|
||||
var sk = FXManager.Instance.SetFx<SkeletonAnimation>(ui.spine_parent, Fx_Type.fx_first_reward, ref closeCallback);
|
||||
sk.state.SetAnimation(0, "newbie_reward_an01", false);
|
||||
sk.state.Complete += a =>
|
||||
{
|
||||
sk.state.SetAnimation(0, "newbie_reward_an02", true);
|
||||
ui.btn_getreward.SetClick(() =>
|
||||
{
|
||||
ui.btn_getreward.visible = false;
|
||||
sk.state.SetAnimation(0, "newbie_reward_an03", false);
|
||||
sk.state.Complete += a =>
|
||||
{
|
||||
ui.state.selectedIndex = com_first_award.State_page;
|
||||
};
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
ui.btn_get.SetClick(GetReward);
|
||||
// ui.btn_close.SetClick(GetReward);
|
||||
}
|
||||
private void GetReward()
|
||||
{
|
||||
if (is_get) return;
|
||||
is_get = true;
|
||||
|
||||
|
||||
var start = GameHelper.GetUICenterPosition(ui.img_gold);
|
||||
var end = GameHelper.GetUICenterPosition(ui.end_point);
|
||||
|
||||
int awardNum = ConfigSystem.GetConfig<CommonModel>().InitialNum;
|
||||
|
||||
var rewardData = new RewardData();
|
||||
|
||||
var rewardSingleData = new RewardSingleData(102, awardNum, RewardOrigin.AdTask)
|
||||
{
|
||||
startPosition = start,
|
||||
endPosition = new Vector2(end.x - 110, end.y - 110)
|
||||
};
|
||||
|
||||
rewardData.AddReward(rewardSingleData);
|
||||
rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
|
||||
rewardData.AddCompleted(success =>
|
||||
{
|
||||
if (success)
|
||||
{
|
||||
GameHelper.AddGoldNumber(50);
|
||||
|
||||
//var startNum = DataMgr.Coin.Value - awardNum;
|
||||
// DOVirtual.Float((float)startNum, (float)DataMgr.Coin.Value, 1,
|
||||
// value => { ui.money.GetChild("text_gold").text = GameHelper.Get101Str((decimal)value); });
|
||||
SaveData.GetSaveObject().IsGetFirstReward = true;
|
||||
SaveData.saveDataFunc();
|
||||
|
||||
DOVirtual.DelayedCall(1f, () =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.FirstRewardUI_Close);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Update101);
|
||||
});
|
||||
}
|
||||
});
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 10ed78edd8a4f471d8230502a75e04f5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,71 @@
|
||||
namespace ChillConnect
|
||||
{
|
||||
public class FirstRewardUICtrl : BaseUICtrl
|
||||
{
|
||||
private FirstRewardUI ui;
|
||||
private FirstRewardModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.FirstRewardUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.FirstRewardUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.FirstRewardModel) as FirstRewardModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new FirstRewardUI(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: 943432b7abe7d41eb9b023894a945fcf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user