【调整】代码结构调整、归纳登录功能

Android_release
zhangaotian 2024-08-08 19:16:02 +08:00
parent cb5bbe82ba
commit b4833ef177
36 changed files with 211 additions and 207 deletions

View File

@ -40,7 +40,7 @@ public class GameBuildEditorInspector : OdinEditor
_buildName = _buildName.Replace(" ", "");
var configName = $"{_buildName}";
var configPath = string.Format(Constants.BuildConfigPath, configName);
var configPath = string.Format(PathConstants.BuildConfigPath, configName);
var savedConfig = AssetDatabase.LoadAssetAtPath<TextAsset>(configPath);
if (savedConfig != null)
{

View File

@ -173,7 +173,7 @@ public class LevelEditorWindow : OdinEditorWindow
private void CreateHole(List<float> xPos, List<float> yPos)
{
var tHole = AssetDatabase.LoadAssetAtPath<GameObject>(string.Format(Constants.ItemPrefabPath, "Kong"));
var tHole = AssetDatabase.LoadAssetAtPath<GameObject>(string.Format(PathConstants.ItemPrefabPath, "Kong"));
var kongRoot = GameObject.Find("KongRoot");
_holeWithoutEmpty = new Dictionary<string, Kong>();
_holeDic = new Dictionary<string, Kong>();
@ -400,14 +400,14 @@ public class LevelEditorWindow : OdinEditorWindow
foreach (var pos in plankPos)
{
//加载Plank实例
var tPlank = AssetDatabase.LoadAssetAtPath<GameObject>(string.Format(Constants.PlankPrefabPath, plankName));
var tPlank = AssetDatabase.LoadAssetAtPath<GameObject>(string.Format(PathConstants.PlankPrefabPath, plankName));
var plank = Instantiate(tPlank, pos.Key, tPlank.transform.rotation);
var sortLayer = plank.GetComponent<SpriteRenderer>().sortingOrder;
//加载HoleOfPlank实例
foreach (var index in pos.Value)
{
var holePos = _holeWithoutEmpty[string.Format("Kong{0}", index)].Obj.transform.position;
var tHole = AssetDatabase.LoadAssetAtPath<GameObject>(string.Format(Constants.ItemPrefabPath,
var tHole = AssetDatabase.LoadAssetAtPath<GameObject>(string.Format(PathConstants.ItemPrefabPath,
HoleOfPlank));
var hole = Instantiate(tHole, holePos, tHole.transform.rotation);
hole.transform.SetParent(plank.transform, true);
@ -1590,10 +1590,10 @@ public class LevelEditorWindow : OdinEditorWindow
_levelIds.RemoveAll(level => level.LevelID == levelID);
_levelIds.Add(new AllLevelID(levelID));
var levelConfigPath = string.Format(Constants.LevelConfigPath, levelID);
var levelConfigPath = string.Format(PathConstants.LevelConfigPath, levelID);
JsonHelper.SaveJson(levelConfigPath, curLevelData);
var levelListConfigPath = string.Format(Constants.LevelListPath);
var levelListConfigPath = string.Format(PathConstants.LevelListPath);
JsonHelper.SaveJson(levelListConfigPath, _levelIds);
DestroyPlanks();
@ -1638,7 +1638,7 @@ public class LevelEditorWindow : OdinEditorWindow
[MenuItem("Tools/关卡生成器")]
private static void OpenWindow()
{
EditorSceneManager.OpenScene(Constants.LevelGenerator);
EditorSceneManager.OpenScene(PathConstants.LevelGenerator);
_thisWindow = GetWindow<LevelEditorWindow>();
_thisWindow.position = GUIHelper.GetEditorWindowRect().AlignCenter(800, 600);
_thisWindow.InitLevelList();
@ -1658,7 +1658,7 @@ public class LevelEditorWindow : OdinEditorWindow
var plankClass = new CustomPlank();
plankClass.type = (LevelData.PlankType)plankValues.GetValue(i);
plankClass.icon =
AssetDatabase.LoadAssetAtPath<GameObject>(string.Format(Constants.PlankPrefabPath, plankClass.type));
AssetDatabase.LoadAssetAtPath<GameObject>(string.Format(PathConstants.PlankPrefabPath, plankClass.type));
plankTypes.Add(plankClass);
}
@ -1667,7 +1667,7 @@ public class LevelEditorWindow : OdinEditorWindow
private void InitLevelList()
{
var configFilePath = string.Format(Constants.LevelListPath);
var configFilePath = string.Format(PathConstants.LevelListPath);
_levelIds = new List<AllLevelID>();
_levelIds = JsonHelper.LoadJson<List<AllLevelID>>(configFilePath);
int levelNumber = 1;

View File

@ -13,10 +13,6 @@ namespace Framework.Constants
public const string Chinese = "简体中文";
public const string English = "English";
//设置本地存档Key
public const string FirstLaunch = "Launch";
//BI事件
public const string FteLevelSuccess = "fte_level_success_{0}";
public const string FteLevelEnter = "fte_level_enter_{0}";
@ -27,8 +23,6 @@ namespace Framework.Constants
public const int PopUpLimitNumber = 8;
public const int LevelRateIndex = 4;
public const int DefaultUnlockCondition = 100;
/// <summary>
/// 关卡选择 一页数量
/// </summary>

View File

@ -1,10 +1,7 @@
namespace Framework.Constants
{
public partial class Constants
public class PathConstants
{
//User
public const string EmptyUser = "";
//新手引导遮罩预制体
public const string GuideMaskObj = "Assets/Art/UI/Prefab/GuideMask.prefab";
@ -26,9 +23,6 @@ namespace Framework.Constants
public const string ItemPrefabPath = "Assets/Art/LevelItem/{0}.prefab";
public const string PlankPrefabPath = "Assets/Art/LevelItem/Plank/{0}.prefab";
//ChoicePanel Texture
public const string UIChoiceTexturePath = "Assets/Art/Texture/ChoicePanel/{0}.png";
//Gfx
public const string GfxPath = "Assets/Art/Gfx/prefab/{0}.prefab";

View File

@ -5,9 +5,9 @@ using UnityEngine;
using Framework.UI;
using Gameplay.Manager;
using Framework.Manager;
using Framework.Constants;
using Cysharp.Threading.Tasks;
using System.Collections.Generic;
using Constants = Framework.Constants.Constants;
public class GuideMananger : Singlenton<GuideMananger>, IInitable
{
@ -96,7 +96,7 @@ public class GuideMananger : Singlenton<GuideMananger>, IInitable
private async UniTask InitGuideMaskUI()
{
var targetCanvas = UIRoot.Instance.rootMatch;
var obj = await AssetManager.Instance.LoadAssetAsync<GameObject>(Constants.GuideMaskObj);
var obj = await AssetManager.Instance.LoadAssetAsync<GameObject>(PathConstants.GuideMaskObj);
_guideMask = Object.Instantiate(obj, targetCanvas.transform);
_guideMask.SetActive(false);
}
@ -197,7 +197,7 @@ public class GuideMananger : Singlenton<GuideMananger>, IInitable
public void Release()
{
AssetManager.Instance.Unload(Constants.GuideMaskObj);
AssetManager.Instance.Unload(PathConstants.GuideMaskObj);
}
/// <summary>

View File

@ -1,15 +1,11 @@
using PhxhSDK;
namespace Gameplay.Login
namespace Framework.Login
{
public class LoginManager : Singlenton<LoginManager>, IInitable
{
private LoginStatus[] _mStatusList;
public string Account
{
get => CurrentStatus.GetProfileName();
}
private LoginStatus[] _mStatusList;
/// <summary>
/// 是否登录

View File

@ -1,6 +1,4 @@
using Framework.Constants;
namespace Gameplay.Login
namespace Framework.Login
{
public enum LoginStatusID
{
@ -29,7 +27,7 @@ namespace Gameplay.Login
public virtual string GetProfileName()
{
return Constants.EmptyUser;
return "";
}
public virtual void Logout()

View File

@ -1,10 +1,10 @@
using cfg.BI;
using PhxhSDK;
using Framework.BI;
using Gameplay.Login;
using Framework.Event;
using Constants = Framework.Constants.Constants;
namespace Framework.Login
{
public class LoginStatusApple : LoginStatus
{
public override LoginStatusID ID
@ -45,7 +45,7 @@ public class LoginStatusApple : LoginStatus
loginService?.SetCurLoginParty(ThirdLoginSDK.AppleSignIn);
string profileName = loginService?.GetProfileName();
DebugUtil.LogWarning("Apple Get UserName: {0}", profileName);
return string.IsNullOrEmpty(profileName) ? Constants.EmptyUser : profileName;
return string.IsNullOrEmpty(profileName) ? "" : profileName;
}
private void OnLoginSuccess(string userID, string appleUserID, string idToken)
@ -58,7 +58,7 @@ public class LoginStatusApple : LoginStatus
//BI事件
BIManager.Instance.ThirdID = userID;
BIManager.Instance.TrackEvent(Event.login_success);
BIManager.Instance.TrackEvent(cfg.BI.Event.login_success);
BIManager.Instance.TrackEventOnce(EventFirst.fte_login_success);
//从服务器获取数据
@ -77,8 +77,9 @@ public class LoginStatusApple : LoginStatus
private void OnLoginFail(int code, string msg)
{
LoginManager.Instance.IsLogin = false;
BIManager.Instance.TrackEvent(Event.login_fail, msg);
BIManager.Instance.TrackEvent(cfg.BI.Event.login_fail, msg);
DebugUtil.LogError("Apple Login Fail: {0}", msg);
EventManager.Instance.Send(EventManager.EventName.LoginFail);
}
}
}

View File

@ -2,10 +2,8 @@ using cfg.BI;
using PhxhSDK;
using Framework.BI;
using Framework.Event;
using Event = cfg.BI.Event;
using Constants = Framework.Constants.Constants;
namespace Gameplay.Login
namespace Framework.Login
{
public class LoginStatusFaceBook : LoginStatus
{
@ -38,7 +36,7 @@ namespace Gameplay.Login
loginService?.SetCurLoginParty(ThirdLoginSDK.Facebook);
string profileName = loginService?.GetProfileName();
DebugUtil.LogWarning("Facebook Get UserName: {0}", profileName);
return string.IsNullOrEmpty(profileName) ? Constants.EmptyUser : profileName;
return string.IsNullOrEmpty(profileName) ? "" : profileName;
}
private void OnLoginSuccess(string userID, string facebookUserID, string idToken)
@ -50,7 +48,7 @@ namespace Gameplay.Login
AppInfoManager.Instance.ThirdLoginSuccess(userID, LoginStatusID.Facebook);
BIManager.Instance.ThirdID = userID;
BIManager.Instance.TrackEvent(Event.login_success);
BIManager.Instance.TrackEvent(cfg.BI.Event.login_success);
BIManager.Instance.TrackEventOnce(EventFirst.fte_login_success);
//从服务器获取数据
@ -69,7 +67,7 @@ namespace Gameplay.Login
private void OnLoginFail(int code, string msg)
{
LoginManager.Instance.IsLogin = false;
BIManager.Instance.TrackEvent(Event.login_fail, msg);
BIManager.Instance.TrackEvent(cfg.BI.Event.login_fail, msg);
DebugUtil.LogError("FaceBook Login Fail: {0}", msg);
EventManager.Instance.Send(EventManager.EventName.LoginFail);
}

View File

@ -1,6 +1,6 @@
using PhxhSDK;
using Gameplay.Login;
using Framework.Event;
using Framework.Login;
using Framework.Manager;
using LC.Newtonsoft.Json;

View File

@ -1,6 +1,5 @@
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using Framework.Constants;
using UnityEngine;
using PhxhSDK;
using System;
@ -37,28 +36,28 @@ namespace Framework.Manager
try
{
BGM = await AssetManager.Instance.LoadAssetAsync<AudioClip>(
string.Format(Framework.Constants.Constants.MusicPath, "BGM1"));
string.Format(Framework.Constants.PathConstants.MusicPath, "BGM1"));
BGMInLevel = await AssetManager.Instance.LoadAssetAsync<AudioClip>(
string.Format(Framework.Constants.Constants.MusicPath, "BGM2"));
string.Format(Framework.Constants.PathConstants.MusicPath, "BGM2"));
PreLoadAudio("S_Btn", await AssetManager.Instance.LoadAssetAsync<AudioClip>(
string.Format(Framework.Constants.Constants.SoundPath, "S_Btn")));
string.Format(Framework.Constants.PathConstants.SoundPath, "S_Btn")));
PreLoadAudio("S_Win", await AssetManager.Instance.LoadAssetAsync<AudioClip>(
string.Format(Framework.Constants.Constants.SoundPath, "S_Win")));
string.Format(Framework.Constants.PathConstants.SoundPath, "S_Win")));
PreLoadAudio("S_Lose", await AssetManager.Instance.LoadAssetAsync<AudioClip>(
string.Format(Framework.Constants.Constants.SoundPath, "S_Lose")));
string.Format(Framework.Constants.PathConstants.SoundPath, "S_Lose")));
PreLoadAudio("S_Reward", await AssetManager.Instance.LoadAssetAsync<AudioClip>(
string.Format(Framework.Constants.Constants.SoundPath, "S_Reward")));
string.Format(Framework.Constants.PathConstants.SoundPath, "S_Reward")));
PreLoadAudio("S_AddTime", await AssetManager.Instance.LoadAssetAsync<AudioClip>(
string.Format(Framework.Constants.Constants.SoundPath, "S_AddTime")));
string.Format(Framework.Constants.PathConstants.SoundPath, "S_AddTime")));
PreLoadAudio("S_OpenHole", await AssetManager.Instance.LoadAssetAsync<AudioClip>(
string.Format(Framework.Constants.Constants.SoundPath, "S_OpenHole")));
string.Format(Framework.Constants.PathConstants.SoundPath, "S_OpenHole")));
PreLoadAudio("S_Undo", await AssetManager.Instance.LoadAssetAsync<AudioClip>(
string.Format(Framework.Constants.Constants.SoundPath, "S_Undo")));
string.Format(Framework.Constants.PathConstants.SoundPath, "S_Undo")));
PreLoadAudio("S_Thumbtack", await AssetManager.Instance.LoadAssetAsync<AudioClip>(
string.Format(Framework.Constants.Constants.SoundPath, "S_Thumbtack")));
string.Format(Framework.Constants.PathConstants.SoundPath, "S_Thumbtack")));
PreLoadAudio("S_PlankDrop", await AssetManager.Instance.LoadAssetAsync<AudioClip>(
string.Format(Framework.Constants.Constants.SoundPath, "S_PlankDrop")));
string.Format(Framework.Constants.PathConstants.SoundPath, "S_PlankDrop")));
}
catch (Exception e)
{

View File

@ -397,7 +397,7 @@ namespace Framework.Manager
{
try
{
var path = string.Format(Constants.Constants.BuildBlueprint, _curBuildData.buildID);
var path = string.Format(Constants.PathConstants.BuildBlueprint, _curBuildData.buildID);
CurBlueprint = await AssetManager.Instance.LoadAssetAsync<Sprite>(path);
}
catch (Exception e)

View File

@ -37,7 +37,7 @@ namespace Framework.Manager
public static JSONNode LoadByteBuf(string file)
{
// todo: load from asset loader
var filePath = string.Format(Constants.Constants.TableDataConfigPath, file);
var filePath = string.Format(Constants.PathConstants.TableDataConfigPath, file);
var loadAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(filePath);
var jsonText = loadAsset.text;
return JSON.Parse(jsonText);

View File

@ -1,59 +0,0 @@
using Framework.Manager;
using Framework.UI;
using UnityEngine;
using PhxhSDK;
public class SettingData
{
public float MusicVolume = 1f;
public float SoundVolume = 1f;
public string Language;
}
public class SettingManager : Singlenton<SettingManager>
{
private const string SettingKey = "SettingKey";
private SettingData _settingData;
public void Init()
{
_settingData = StorageManager.Instance.GetStorage<SettingData>(SettingKey);
_settingData ??= new SettingData();
//初始化音量
AudioManager.Instance.MuteVolume(true);
AudioManager.Instance.SoundVolume = _settingData.SoundVolume;
AudioManager.Instance.MusicVolume = _settingData.MusicVolume;
var muteMusic = Mathf.Approximately(_settingData.MusicVolume, 1f);
var muteSound = Mathf.Approximately(_settingData.SoundVolume, 1f);
AudioManager.Instance.MuteMusic(muteMusic);
AudioManager.Instance.MuteSound(muteSound);
//初始化语言
StringManager.Instance.InitLanguage(_settingData.Language);
}
public void SetMusic(float music)
{
_settingData.MusicVolume = music;
SaveSetting();
}
public void SetSound(float sound)
{
_settingData.SoundVolume = sound;
SaveSetting();
}
public void SetLanguage(string language)
{
_settingData.Language = language;
SaveSetting();
}
private void SaveSetting()
{
StorageManager.Instance.SaveWithoutUpdate();
}
}

View File

@ -29,7 +29,7 @@ namespace Framework
private static string _CombinePath(string fileName)
{
return string.Format(Constants.Constants.TableDataConfigPath, fileName);
return string.Format(Constants.PathConstants.TableDataConfigPath, fileName);
}
public async UniTask Load()

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2d4f5d2d875a24e9792649d6b137f2d2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,75 @@
using Framework.Manager;
using Framework.UI;
using UnityEngine;
using PhxhSDK;
namespace Framework.Setting
{
public class SettingData
{
public float MusicVolume = 1f;
public float SoundVolume = 1f;
public string Language;
public bool FirstLaunch = true;
}
public class SettingManager : Singlenton<SettingManager>
{
private const string SettingKey = "SettingKey";
private SettingData _settingData;
public void Init()
{
_settingData = StorageManager.Instance.GetStorage<SettingData>(SettingKey);
_settingData ??= new SettingData();
//初始化音量
AudioManager.Instance.MuteVolume(true);
AudioManager.Instance.SoundVolume = _settingData.SoundVolume;
AudioManager.Instance.MusicVolume = _settingData.MusicVolume;
var muteMusic = Mathf.Approximately(_settingData.MusicVolume, 1f);
var muteSound = Mathf.Approximately(_settingData.SoundVolume, 1f);
AudioManager.Instance.MuteMusic(muteMusic);
AudioManager.Instance.MuteSound(muteSound);
//初始化语言
StringManager.Instance.InitLanguage(_settingData.Language);
}
public void SetMusic(float music)
{
_settingData.MusicVolume = music;
SaveSetting();
}
public void SetSound(float sound)
{
_settingData.SoundVolume = sound;
SaveSetting();
}
public void SetLanguage(string language)
{
_settingData.Language = language;
SaveSetting();
}
public void SetFirstLaunch()
{
_settingData.FirstLaunch = false;
SaveSetting();
}
public bool IsFirstLaunch()
{
return _settingData.FirstLaunch;
}
private void SaveSetting()
{
StorageManager.Instance.SaveWithoutUpdate();
}
}
}

View File

@ -132,7 +132,7 @@ namespace Framework.UI
{
try
{
var path = string.Format(Constants.Constants.UIPrefabPath, windowName);
var path = string.Format(Constants.PathConstants.UIPrefabPath, windowName);
var uiPrefab = await AssetManager.Instance.LoadAssetAsync<GameObject>(path);
return uiPrefab;
}

View File

@ -92,7 +92,7 @@ namespace Gameplay.ForestLevel
{
try
{
var path = string.Format(Framework.Constants.Constants.ItemPrefabPath, itemName);
var path = string.Format(Framework.Constants.PathConstants.ItemPrefabPath, itemName);
var item = await AssetManager.Instance.LoadAssetAsync<GameObject>(path);
return item;
}

View File

@ -3,9 +3,9 @@ using PhxhSDK.Phxh;
using Framework.BI;
using Gameplay.Manager;
using LC.Newtonsoft.Json;
using Cysharp.Threading.Tasks;
using Framework.Constants;
using Gameplay.ForestLevel;
using Constants = Framework.Constants.Constants;
using Cysharp.Threading.Tasks;
namespace Gameplay.Level
{
@ -34,7 +34,7 @@ namespace Gameplay.Level
private async UniTask LoadLevelConfig(string levelID)
{
var configFilePath = string.Format(Constants.LevelConfigPath, levelID);
var configFilePath = string.Format(PathConstants.LevelConfigPath, levelID);
_levelData = await JsonHelper.LoadFromAddressable<LevelData>(configFilePath);
}

View File

@ -21,7 +21,7 @@ namespace Gameplay.ForestLevel
private LevelData _planksLevelData;
private static readonly string HoleOfPlankPath =
string.Format(Framework.Constants.Constants.ItemPrefabPath, "HoleOfPlank");
string.Format(Framework.Constants.PathConstants.ItemPrefabPath, "HoleOfPlank");
public async UniTask PreLoadLevelItem()
{
@ -34,7 +34,7 @@ namespace Gameplay.ForestLevel
var index = plankIndex[i];
var plankName = LevelUtils.GetPlankName(_planksLevelData.planksType[index],
_planksLevelData.squareType[index]);
var plankPath = string.Format(Framework.Constants.Constants.PlankPrefabPath, plankName);
var plankPath = string.Format(Framework.Constants.PathConstants.PlankPrefabPath, plankName);
var myPlank = await AssetManager.Instance.LoadAssetAsync<GameObject>(plankPath);
var pos = LevelUtils.GetPlankPositionInfo(KongManager.Instance.HoleDic,
_planksLevelData.HolesOfPlanksIndex[index], _planksLevelData.planksType[index],

View File

@ -2,7 +2,7 @@ using PhxhSDK;
using Framework.UI;
using Framework.BI;
using Gameplay.Game;
using Gameplay.Login;
using Framework.Login;
using Gameplay.Manager;
using Framework.Manager;
using Gameplay.LoadingExecutor;

View File

@ -1,13 +1,13 @@
using cfg.BI;
using PhxhSDK;
using Framework;
using UnityEngine;
using Framework.BI;
using Framework.UI;
using PhxhSDK.Phxh;
using Gameplay.Login;
using Framework.Login;
using Framework.Event;
using Gameplay.Manager;
using Framework.Setting;
using Framework.Manager;
using Framework.Constants;
using Cysharp.Threading.Tasks;
@ -72,8 +72,8 @@ namespace Gameplay.LoadingExecutor
}
var buildId = buildInfo.BuildData;
var buildPath = string.Format(Framework.Constants.Constants.SceneBuildPath, buildId);
var buildConfig = string.Format(Framework.Constants.Constants.BuildConfigPath, buildId);
var buildPath = string.Format(Framework.Constants.PathConstants.SceneBuildPath, buildId);
var buildConfig = string.Format(Framework.Constants.PathConstants.BuildConfigPath, buildId);
var buildData = await JsonHelper.LoadFromAddressable<BuildData>(buildConfig);
var reachCondition = LevelSelectManager.Instance.CurPassLevelIndex;
if (GuideMananger.Instance.IsGuiding && !string.IsNullOrEmpty(GuideMananger.Instance.PassLevelID))
@ -106,11 +106,12 @@ namespace Gameplay.LoadingExecutor
if (AppInfoManager.Instance.UpdateConfirm && !GuideMananger.Instance.IsGuiding)
await UIManager.Instance.OpenWindow(UIConstants.UISyncTip);
#if UNITY_IOS
if (!AppInfoManager.Instance.CheckIfLogin() && !LoginManager.Instance.ShowLogin && !GuideMananger.Instance.IsGuiding)
if (!AppInfoManager.Instance.CheckIfLogin() && !LoginManager.Instance.ShowLogin &&
!GuideMananger.Instance.IsGuiding)
await UIManager.Instance.OpenWindow(UIConstants.UILogin);
#endif
if (!PlayerPrefs.HasKey(LevelConstants.FirstLaunch))
if (SettingManager.Instance.IsFirstLaunch())
{
await UIManager.Instance.OpenWindow(UIConstants.UIUserAgreement);
}

View File

@ -8,7 +8,6 @@ using Cysharp.Threading.Tasks;
using Gameplay.ForestLevel;
using UnityEngine.SceneManagement;
using UnityEngine.AddressableAssets;
using Constants = Framework.Constants.Constants;
namespace Gameplay.LoadingExecutor
{
@ -18,7 +17,7 @@ namespace Gameplay.LoadingExecutor
protected override async UniTask _DoLoading()
{
await Addressables.LoadSceneAsync(Constants.SceneLevelPath, LoadSceneMode.Single).ToUniTask();
await Addressables.LoadSceneAsync(PathConstants.SceneLevelPath, LoadSceneMode.Single).ToUniTask();
_destProgress = 10f;
await LevelManager.Instance.LoadLevel(_levelID);
_destProgress = 20f;

View File

@ -3,9 +3,9 @@ using PhxhSDK;
using UnityEngine;
using Framework.UI;
using System.Collections;
using Framework.Constants;
using Cysharp.Threading.Tasks;
using System.Collections.Generic;
using Constants = Framework.Constants.Constants;
public class GfxManager : SingletonMono<GfxManager>, IInitable
{
@ -71,7 +71,7 @@ public class GfxManager : SingletonMono<GfxManager>, IInitable
if (!gfxDic.ContainsKey(gfxName))
{
var gfx = await AssetManager.Instance.LoadAssetAsync<GameObject>(string.Format(Constants.GfxPath,
var gfx = await AssetManager.Instance.LoadAssetAsync<GameObject>(string.Format(PathConstants.GfxPath,
gfxName));
var root = inUI ? UIRoot.Instance.root.transform : UIRoot.Instance.rootGfx.transform;
var gfxObj = Instantiate(gfx, root);
@ -150,7 +150,7 @@ public class GfxManager : SingletonMono<GfxManager>, IInitable
{
if (gfxDic.TryGetValue(gfxName, out var gfx))
{
AssetManager.Instance.Unload(string.Format(Constants.GfxPath, gfxName));
AssetManager.Instance.Unload(string.Format(PathConstants.GfxPath, gfxName));
}
}

View File

@ -8,7 +8,6 @@ using Framework.Manager;
using Framework.Constants;
using Cysharp.Threading.Tasks;
using System.Collections.Generic;
using Constants = Framework.Constants.Constants;
namespace Gameplay.Manager
{
@ -43,7 +42,7 @@ namespace Gameplay.Manager
{
try
{
var configFilePath = string.Format(Constants.LevelListPath);
var configFilePath = string.Format(PathConstants.LevelListPath);
_allLevels = await JsonHelper.LoadFromAddressable<List<AllLevelData>>(configFilePath);
}
catch (Exception e)

View File

@ -3,7 +3,7 @@ using UnityEngine;
using Framework.UI;
using Framework.BI;
using UnityEngine.UI;
using Gameplay.Login;
using Framework.Login;
using Framework.Event;
using Gameplay.Manager;
using Framework.Manager;

View File

@ -18,7 +18,7 @@ public class UIScoreController : UIWindow
private void GoToScore()
{
var url = Application.platform == RuntimePlatform.Android ? Constants.ScoreUrlAndroid : Constants.ScoreUrlIOS;
var url = Application.platform == RuntimePlatform.Android ? PathConstants.ScoreUrlAndroid : PathConstants.ScoreUrlIOS;
Application.OpenURL(url);
UnityEngine.PlayerPrefs.SetInt(LevelConstants.PopUpToScore, 1);
CloseWindow();

View File

@ -3,6 +3,7 @@ using Framework.BI;
using Framework.UI;
using UnityEngine.UI;
using Framework.Event;
using Framework.Setting;
using Framework.Constants;
public class UIUserAgreementController : UIWindow
@ -29,14 +30,13 @@ public class UIUserAgreementController : UIWindow
private void OpenURL()
{
Application.OpenURL(Constants.AgreementUrl);
Application.OpenURL(PathConstants.AgreementUrl);
}
private void OnAgree()
{
CloseWindow(true);
PlayerPrefs.SetInt(LevelConstants.FirstLaunch, 1);
SettingManager.Instance.SetFirstLaunch();
BIManager.Instance.TrackEventOnce(cfg.BI.EventFirst.fte_privacy_agree);
}
}

View File

@ -4,10 +4,11 @@ using cfg.BI;
using UnityEngine;
using Framework.UI;
using Framework.BI;
using Gameplay.Login;
using UnityEngine.UI;
using Framework.Event;
using Framework.Login;
using Framework.Manager;
using Framework.Setting;
using Framework.Constants;
using Event = cfg.BI.Event;