Forest_Client/Forest/Assets/Scripts/Gameplay/Debug/SROptions.Level.cs

137 lines
3.7 KiB
C#

using System.ComponentModel;
using Framework.Constants;
using LC.Newtonsoft.Json;
using Gameplay.Manager;
using Framework.Event;
using Gameplay.Level;
using Framework.UI;
using PhxhSDK;
public partial class SROptions
{
[Category("关卡相关"), DisplayName("增加10s")]
public void IncreaseTime()
{
LevelManager.Instance.RemainingTime += 10f;
}
[Category("关卡相关"), DisplayName("减少10s")]
public void ReduceTime()
{
LevelManager.Instance.RemainingTime -= 10f;
}
[Category("关卡相关"), DisplayName("成功通关")]
public void PassLevel()
{
EventManager.Instance.Send(EventManager.EventName.LevelGameWin);
}
[Category("关卡相关"), DisplayName("失败通关")]
public void LoseLevel()
{
EventManager.Instance.Send(EventManager.EventName.LevelGameLose);
}
[Category("关卡相关"), DisplayName("解锁所有关卡")]
public void PassAllLevel()
{
LevelSelectManager.Instance.PassAllLevel();
}
[Category("关卡相关"), DisplayName("开启新手模式")]
public void OpenNewGuide()
{
LevelManager.Instance.IsNewbieGuide = true;
}
[Category("关卡相关"), DisplayName("通关到")]
public int PassLevelIndex
{
get => LevelSelectManager.Instance.CurPassLevelIndex;
set => LevelSelectManager.Instance.PassAllLevel(value);
}
[Category("界面相关"), DisplayName("开启评分弹窗")]
public void OpenScore()
{
UIManager.Instance.OpenWindow(UIConstants.UIScore);
}
[Category("界面相关"), DisplayName("开启用户隐私协议弹窗")]
public void OpenUserAgreement()
{
UIManager.Instance.OpenWindow(UIConstants.UIUserAgreement);
}
[Category("界面相关"), DisplayName("开启同步弹窗")]
public void OpenSyncData()
{
UIManager.Instance.OpenWindow(UIConstants.UISyncTip);
}
[Category("存档相关"), DisplayName("清除所有本地数据")]
public void ClearFile()
{
LevelSelectManager.Instance.ClearFile();
}
[Category("道具相关"), DisplayName("增加开孔道具")]
public void AddUndoProp()
{
LevelManager.Instance.AddUndoProp();
}
[Category("金币相关"), DisplayName("无限金币")]
public void UnlimitedCoins()
{
ShopManager.Instance.UnlimitedCoins();
}
[Category("金币相关"), DisplayName("清空金币")]
public void EmptyCoins()
{
ShopManager.Instance.EmptyCoins();
}
[Category("购买相关"), DisplayName("打开本地测试商店")]
public void OpenDebugBuyProducts()
{
ShopManager.Instance.IsDebug = true;
}
[Category("购买相关"), DisplayName("关闭本地测试商店")]
public void CloseDebugBuyProducts()
{
ShopManager.Instance.IsDebug = false;
}
[Category("HoleDebug"), DisplayName("孔的Debug显示")]
public void HoleDebug()
{
KongManager.Instance.ShowHoleIndex();
}
[Category("服务器相关"), DisplayName("上传数据")]
public void UploadData()
{
var jsonData = JsonConvert.SerializeObject(AppInfoManager.Instance.AppUserInfo);
EventManager.Instance.Send(EventManager.EventName.UploadToRemote, jsonData);
}
[Category("服务器相关"), DisplayName("清空服务器数据")]
public void ClearRemoteData()
{
AppInfoManager.Instance.ClearRemoteDataWithClientID();
}
#if SDK_FIREBASE
[Category("崩溃相关"), DisplayName("发送Firebase崩溃测试")]
public void TestCrash()
{
var helper = SDKManager.GetSingleton().GetSdkHelper(SDKManager.SdkName.FireBase) as FireBaseSdkHelper;
helper?.TestCrash();
}
#endif
}