mergemilitary/Assets/Scripts/Debug/SROptions.MergeTactics.cs

259 lines
6.6 KiB
C#
Raw Normal View History

2022-05-23 13:39:59 +00:00
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using SRDebugger;
using SRDebugger.Services;
using SRF;
using SRF.Service;
using Debug = UnityEngine.Debug;
using Random = UnityEngine.Random;
using UnityEngine;
public partial class SROptions
{
2022-09-09 14:35:49 +00:00
public static bool sIsBPShowed = false;
2022-05-23 13:39:59 +00:00
private bool mIsEditorPlayer = true;
2022-07-04 11:17:39 +00:00
private bool mIsSpeedBtnShow = true;
2022-09-09 14:35:49 +00:00
private int mHumanLv = 1;
private int mMonsterLv = 1;
2022-05-23 13:39:59 +00:00
[Category("数值")]
public int
{
get => PlayerData.Instance.CurrentLevel;
set
{
PlayerData.Instance.CurrentLevel = Math.Max(value, 1);
GameManager.Instance.LoadGame();
}
}
2022-07-04 11:17:39 +00:00
[Category("数值")]
public int
{
get
{
return PlayerData.Instance.Diamond;
}
set
{
PlayerData.Instance.Diamond = value;
UIUtils.RefreshDiamond();
}
}
2022-05-23 13:39:59 +00:00
[Category("数值")]
public int
{
get
{
return PlayerData.Instance.Coin;
}
set
{
PlayerData.Instance.Coin = value;
UIUtils.RefreshCoin();
}
}
2022-09-09 14:35:49 +00:00
[Category("功能")]
public bool
2022-05-23 13:39:59 +00:00
{
2022-09-09 14:35:49 +00:00
get => PlayerData.Instance.IsMMOUser;
set => PlayerData.Instance.IsMMOUser = value;
}
2022-05-23 13:39:59 +00:00
2022-10-10 08:20:54 +00:00
[Category("功能")]
public bool IP内容
{
get => PlayerData.Instance.IsIPShow;
set => PlayerData.Instance.IsIPShow = value;
}
2022-09-09 14:35:49 +00:00
[Category("功能")]
public bool
{
get => sIsBPShowed;
2022-05-23 13:39:59 +00:00
set
{
2022-09-09 14:35:49 +00:00
sIsBPShowed = value;
UIManager.Instance.GetUI<PanelTopBar>().ShowBP(sIsBPShowed);
2022-05-23 13:39:59 +00:00
}
}
2022-09-09 14:35:49 +00:00
[Category("功能")]
public bool UI开关
{
get => UIManager.Instance.gameObject.activeSelf;
set => UIManager.Instance.gameObject.SetActive(value);
}
2022-05-23 13:39:59 +00:00
[Category("功能")]
public bool
{
get => mIsEditorPlayer;
set
{
mIsEditorPlayer = value;
GameManager.Instance.CurrentEnemyBlockMgr.EnableInteraction(!mIsEditorPlayer);
GameManager.Instance.CurrentEnemyBlockMgr.ShowFloor(!mIsEditorPlayer);
}
}
2022-07-04 11:17:39 +00:00
[Category("功能")]
public bool
{
get => GameManager.Instance.IsPlayerUndefeatable;
set => GameManager.Instance.IsPlayerUndefeatable = value;
}
[Category("功能")]
public bool
{
get => GameManager.Instance.IsEnemyUndefeatable;
set => GameManager.Instance.IsEnemyUndefeatable = value;
}
2022-05-23 13:39:59 +00:00
[Category("功能")]
public void ()
{
if (mIsEditorPlayer)
{
GameManager.Instance.CurrentPlayerBlockMgr.ClearAll();
}
else
{
GameManager.Instance.CurrentEnemyBlockMgr.ClearAll();
}
}
[Category("功能")]
public bool
{
get => Time.timeScale < 0.1f;
set => Time.timeScale = value ? 0 : 1;
}
2022-09-09 14:35:49 +00:00
[Category("功能")]
public void ()
{
MMOModule.Instance.DeleteAccount((pResult) =>
{
if (pResult)
{
UIUtils.ShowTips("删除成功,请重装游戏!");
}
});
}
2022-07-04 11:17:39 +00:00
[Category("功能")]
public bool
{
get => !mIsSpeedBtnShow;
set
{
mIsSpeedBtnShow = !value;
UIManager.Instance.GetUI<PanelGame>().ShowSpeedBtn(mIsSpeedBtnShow);
}
}
2022-09-09 14:35:49 +00:00
[Category("远程")]
public int
{
get => mHumanLv;
set => mHumanLv = Mathf.Clamp(value, 1, GameConfig.Instance.BlockMaxLevel);
2022-05-23 13:39:59 +00:00
}
2022-09-09 14:35:49 +00:00
[Category("远程")]
public void ()
2022-05-23 13:39:59 +00:00
{
2022-09-09 14:35:49 +00:00
CreateHuman(Mathf.Clamp(mHumanLv, 1, GameConfig.Instance.BlockMaxLevel));
2022-06-08 11:34:30 +00:00
}
2022-05-23 13:39:59 +00:00
private void CreateHuman(int pLevel)
{
if (mIsEditorPlayer)
{
GameManager.Instance.CurrentPlayerBlockMgr.CreateBlockAtRandomPos(BlockType.Human, pLevel);
}
else
{
GameManager.Instance.CurrentEnemyBlockMgr.CreateBlockAtRandomPos(BlockType.Human, pLevel);
}
}
2022-09-09 14:35:49 +00:00
[Category("近战")]
public int
{
get => mMonsterLv;
set => mMonsterLv = Mathf.Clamp(value, 1, GameConfig.Instance.BlockMaxLevel);
2022-06-08 11:34:30 +00:00
}
2022-05-23 13:39:59 +00:00
2022-09-09 14:35:49 +00:00
[Category("近战")]
public void ()
2022-06-08 11:34:30 +00:00
{
2022-09-09 14:35:49 +00:00
CreateMonster(Mathf.Clamp(mHumanLv, 1, GameConfig.Instance.BlockMaxLevel));
2022-06-08 11:34:30 +00:00
}
2022-05-23 13:39:59 +00:00
private void CreateMonster(int pLevel)
{
if (mIsEditorPlayer)
{
GameManager.Instance.CurrentPlayerBlockMgr.CreateBlockAtRandomPos(BlockType.Monster, pLevel);
}
else
{
GameManager.Instance.CurrentEnemyBlockMgr.CreateBlockAtRandomPos(BlockType.Monster, pLevel);
}
}
[Category("镜头")]
public void ()
{
Transform tCamTrans = GameManager.Instance.CurrentGameCam.transform;
tCamTrans.position = new Vector3(0, 19, -16);
tCamTrans.rotation = Quaternion.Euler(55, 0, 0);
GameManager.Instance.CurrentGameCam.fieldOfView = 80;
}
[Category("镜头")]
public void 1()
{
Transform tCamTrans = GameManager.Instance.CurrentGameCam.transform;
tCamTrans.position = new Vector3(0, 19, -16);
tCamTrans.rotation = Quaternion.Euler(55, 0, 0);
GameManager.Instance.CurrentGameCam.fieldOfView = 60;
}
[Category("镜头")]
public void 2()
{
Transform tCamTrans = GameManager.Instance.CurrentGameCam.transform;
tCamTrans.position = new Vector3(0, 6, -20);
tCamTrans.rotation = Quaternion.Euler(20, 0, 0);
GameManager.Instance.CurrentGameCam.fieldOfView = 80;
}
[Category("镜头")]
public void 3()
{
Transform tCamTrans = GameManager.Instance.CurrentGameCam.transform;
tCamTrans.position = new Vector3(0, 23, -2);
tCamTrans.rotation = Quaternion.Euler(90, 0, 0);
GameManager.Instance.CurrentGameCam.fieldOfView = 80;
}
[Category("广告")]
public bool 广
{
get => TKGSDKManager.Instance.IsNoAllAD;
set => TKGSDKManager.Instance.IsNoAllAD = value;
}
}