提交
This commit is contained in:
@@ -8,6 +8,7 @@ namespace FGUI.SLoading
|
||||
{
|
||||
public static void BindAll()
|
||||
{
|
||||
UIObjectFactory.SetPackageItemExtension(com_login_a.URL, typeof(com_login_a));
|
||||
UIObjectFactory.SetPackageItemExtension(pb_bar.URL, typeof(pb_bar));
|
||||
UIObjectFactory.SetPackageItemExtension(com_loading.URL, typeof(com_loading));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
|
||||
namespace FGUI.SLoading
|
||||
{
|
||||
public partial class com_login_a : GComponent
|
||||
{
|
||||
public GTextField text_uid;
|
||||
public Transition t0;
|
||||
public const string URL = "ui://pc0wa25bdz5j6";
|
||||
|
||||
public static com_login_a CreateInstance()
|
||||
{
|
||||
return (com_login_a)UIPackage.CreateObject("SLoading", "com_login_a");
|
||||
}
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
text_uid = (GTextField)GetChildAt(2);
|
||||
t0 = GetTransitionAt(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f5203bde8a473d42ba9ea6bf9b48c93
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +1,5 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
public static class App
|
||||
@@ -15,7 +17,14 @@ namespace ScrewsMaster
|
||||
|
||||
public static void DisplayLoadingUI()
|
||||
{
|
||||
AppDispatcher.Instance.Dispatch(AppMsg.UI_DisplayLoadingUI);
|
||||
if (PlayerPrefs.GetInt("is_gift") == 1)
|
||||
{
|
||||
AppDispatcher.Instance.Dispatch(AppMsg.UI_DisplayLoadingUI);
|
||||
}
|
||||
else
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LoginAUI_Open);
|
||||
}
|
||||
}
|
||||
|
||||
public static void HideLoadingUI(bool isDelay = false)
|
||||
|
||||
@@ -23,4 +23,6 @@ public static class AppMsg
|
||||
public static readonly uint WorldRaycast_EnableChange = ++Cursor_BASE;
|
||||
public static readonly uint App_Focus_True = ++Cursor_BASE;
|
||||
public static readonly uint LoginInit = ++Cursor_BASE;
|
||||
public static readonly uint Show_uid = ++Cursor_BASE;
|
||||
|
||||
}
|
||||
@@ -123,5 +123,7 @@ namespace ScrewsMaster
|
||||
public static uint ThreeDaysGiftUI_Close = ++cursor_OpenClose;
|
||||
public static uint RewardMulNewUI_Open = ++cursor_OpenClose;
|
||||
public static uint RewardMulNewUI_Close = ++cursor_OpenClose;
|
||||
public static uint LoginAUI_Open = ++cursor_OpenClose;
|
||||
public static uint LoginAUI_Close = ++cursor_OpenClose;
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ namespace ScrewsMaster
|
||||
|
||||
protected override void OnEnter()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnLeave()
|
||||
|
||||
@@ -55,5 +55,6 @@ namespace ScrewsMaster
|
||||
public const string RecordViewCtrl = "RecordViewCtrl";
|
||||
public const string ThreeDaysGiftCtrl = "ThreeDaysGiftCtrl";
|
||||
public const string RewardMulNewCtrl = "RewardMulNewCtrl";
|
||||
public const string LoginACtrl = "LoginACtrl";
|
||||
}
|
||||
}
|
||||
@@ -58,5 +58,6 @@ namespace ScrewsMaster
|
||||
public const string RecordViewModel = "RecordViewModel";
|
||||
public const string ThreeDaysGiftModel = "ThreeDaysGiftModel";
|
||||
public const string RewardMulNewModel = "RewardMulNewModel";
|
||||
public const string LoginAModel = "LoginAModel";
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,8 @@ namespace ScrewsMaster
|
||||
moduleManager.AddModel(ModelConst.RecordViewModel, new RecordViewModel());
|
||||
moduleManager.AddModel(ModelConst.ThreeDaysGiftModel, new ThreeDaysGiftModel());
|
||||
moduleManager.AddModel(ModelConst.RewardMulNewModel, new RewardMulNewModel());
|
||||
}
|
||||
moduleManager.AddModel(ModelConst.LoginAModel, new LoginAModel());
|
||||
}
|
||||
public static void AutoRegisterUICtrl()
|
||||
{
|
||||
ModuleManager moduleManager = ModuleManager.Instance;
|
||||
@@ -98,7 +99,8 @@ namespace ScrewsMaster
|
||||
moduleManager.AddUICtrl(UICtrlConst.RecordViewUICtrl, new RecordViewUICtrl());
|
||||
moduleManager.AddUIType(UIConst.ThreeDaysGiftUI, typeof(ThreeDaysGiftUI));
|
||||
moduleManager.AddUIType(UIConst.RewardMulNewUI, typeof(RewardMulNewUI));
|
||||
}
|
||||
moduleManager.AddUIType(UIConst.LoginAUI, typeof(LoginAUI));
|
||||
}
|
||||
|
||||
public static void AutoRegisterCtrl()
|
||||
{
|
||||
@@ -146,7 +148,8 @@ namespace ScrewsMaster
|
||||
moduleManager.AddCtrl(CtrlConst.RecordViewCtrl, new RecordViewCtrl());
|
||||
moduleManager.AddCtrl(CtrlConst.ThreeDaysGiftCtrl, new ThreeDaysGiftCtrl());
|
||||
moduleManager.AddCtrl(CtrlConst.RewardMulNewCtrl, new RewardMulNewCtrl());
|
||||
}
|
||||
moduleManager.AddCtrl(CtrlConst.LoginACtrl, new LoginACtrl());
|
||||
}
|
||||
|
||||
public static void AutoRegisterUIType()
|
||||
{
|
||||
@@ -193,6 +196,7 @@ namespace ScrewsMaster
|
||||
moduleManager.AddUIType(UIConst.RecordViewUI, typeof(RecordViewUI));
|
||||
moduleManager.AddUICtrl(UICtrlConst.ThreeDaysGiftUICtrl, new ThreeDaysGiftUICtrl());
|
||||
moduleManager.AddUICtrl(UICtrlConst.RewardMulNewUICtrl, new RewardMulNewUICtrl());
|
||||
}
|
||||
moduleManager.AddUICtrl(UICtrlConst.LoginAUICtrl, new LoginAUICtrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,5 +53,6 @@ namespace ScrewsMaster
|
||||
public const string RecordViewUI = "RecordViewUI";
|
||||
public const string ThreeDaysGiftUI = "ThreeDaysGiftUI";
|
||||
public const string RewardMulNewUI = "RewardMulNewUI";
|
||||
public const string LoginAUI = "LoginAUI";
|
||||
}
|
||||
}
|
||||
@@ -53,5 +53,6 @@ namespace ScrewsMaster
|
||||
public const string RecordViewUICtrl = "RecordViewUICtrl";
|
||||
public const string ThreeDaysGiftUICtrl = "ThreeDaysGiftUICtrl";
|
||||
public const string RewardMulNewUICtrl = "RewardMulNewUICtrl";
|
||||
public const string LoginAUICtrl = "LoginAUICtrl";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a97b7181c1c44a4a81e32371eca79c0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
public class LoginACtrl : BaseCtrl
|
||||
{
|
||||
public static LoginACtrl Instance { get; private set; }
|
||||
|
||||
private LoginAModel model;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
Instance = this;
|
||||
//model = ModuleManager.Instance..GetModel(ModelConst.LoginAModel) as LoginAModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ce458ea08e19ae49ab45b112e43c3ac
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
public class LoginAModel : BaseModel
|
||||
{
|
||||
#region 生命周期
|
||||
|
||||
protected override void OnInit()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 023fa18d256f9254e8dc1cf3e5abedc4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
|
||||
using FGUI.A000_common;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
public class LoginAUI : BaseUI
|
||||
{
|
||||
private LoginAUICtrl ctrl;
|
||||
private LoginAModel model;
|
||||
private FGUI.SLoading.com_login_a ui;
|
||||
|
||||
public LoginAUI(LoginAUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
uiName = UIConst.LoginAUI;
|
||||
this.ctrl = ctrl;
|
||||
}
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "SLoading";
|
||||
uiInfo.assetName = "com_login_a";
|
||||
uiInfo.layerType = UILayerType.Normal;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.LoginAModel) as LoginAModel;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as FGUI.SLoading.com_login_a;
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
AppDispatcher.Instance.AddListener(AppMsg.Show_uid, Show_uid);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
AppDispatcher.Instance.RemoveListener(AppMsg.Show_uid, Show_uid);
|
||||
}
|
||||
#endregion
|
||||
void Show_uid(object a = null)
|
||||
{
|
||||
ui.text_uid.text = "uid" + GameHelper.GetLoginModel().uid;
|
||||
}
|
||||
//初始化页面逻辑
|
||||
private void InitView()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7bfe1de5c4af9b045b5d16e864c2740b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,73 @@
|
||||
|
||||
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
public class LoginAUICtrl : BaseUICtrl
|
||||
{
|
||||
private LoginAUI ui;
|
||||
private LoginAModel model;
|
||||
|
||||
private uint openUIMsg = UICtrlMsg.LoginAUI_Open;
|
||||
private uint closeUIMsg = UICtrlMsg.LoginAUI_Close;
|
||||
|
||||
#region 生命周期
|
||||
protected override void OnInit()
|
||||
{
|
||||
//model = ModuleManager.Instance.GetModel(ModelConst.LoginAModel) as LoginAModel;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OpenUI(object args = null)
|
||||
{
|
||||
if (ui == null)
|
||||
{
|
||||
ui = new LoginAUI(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: 21ce9bfa8e8a445419258e4aa34612ca
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -62,8 +62,8 @@ namespace ScrewsMaster
|
||||
{
|
||||
//var sk = FXManager.Instance.SetFx<SkeletonAnimation>(baseUI.GetChild("bg_parent") as GGraph, Fx_Type.fx_login, ref closeCallback);
|
||||
//sk.state.SetAnimation(0, "animation", true);
|
||||
var bg = FXManager.Instance.SetFx<SkeletonAnimation>(ui.bg_parent, Fx_Type.fx_title, ref closeCallback);
|
||||
bg.state.SetAnimation(0, "animation", true);
|
||||
// var bg = FXManager.Instance.SetFx<SkeletonAnimation>(ui.bg_parent, Fx_Type.fx_title, ref closeCallback);
|
||||
// bg.state.SetAnimation(0, "animation", true);
|
||||
var light = FXManager.Instance.SetFx<SkeletonAnimation>(ui.light_parent, Fx_Type.fx_title_light, ref closeCallback);
|
||||
light.state.SetAnimation(0, "animation", true);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ using System.Collections;
|
||||
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
|
||||
public class LoginSystem : BaseSystem
|
||||
@@ -121,6 +122,30 @@ namespace ScrewsMaster
|
||||
loginModel.play_data_ver = loginData.play_data_ver;
|
||||
loginModel.debug_log = loginData.debug_log;
|
||||
loginModel.enwp = loginData.enwp;
|
||||
|
||||
if (loginData.is_magic)
|
||||
{
|
||||
if (PlayerPrefs.GetInt("is_gift") != 1)
|
||||
{
|
||||
AppDispatcher.Instance.Dispatch(AppMsg.UI_DisplayLoadingUI);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LoginAUI_Close);
|
||||
}
|
||||
PlayerPrefs.SetInt("is_gift", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if BingoBrainRelease
|
||||
BrigdeIOS.showGameA(true);
|
||||
#else
|
||||
AppDispatcher.Instance.Dispatch(AppMsg.Show_uid);
|
||||
DOVirtual.DelayedCall(2, () =>
|
||||
{
|
||||
BrigdeIOS.showGameA(true);
|
||||
});
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
loginModel.preferences = new Preferences();
|
||||
NetworkKit.CDNUrl = $"{loginData.cdn_url}/";
|
||||
NetworkKit.userId = loginData.uid;
|
||||
|
||||
Reference in New Issue
Block a user