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

281 lines
6.0 KiB
C#

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
{
private bool mIsBPShowed = GameConfig.Instance.IsDebug;
private bool mIsEditorPlayer = true;
[Category("数值")]
public int
{
get => PlayerData.Instance.CurrentLevel;
set
{
PlayerData.Instance.CurrentLevel = Math.Max(value, 1);
GameManager.Instance.LoadGame();
}
}
[Category("数值")]
public int
{
get
{
return PlayerData.Instance.Coin;
}
set
{
PlayerData.Instance.Coin = value;
UIUtils.RefreshCoin();
}
}
[Category("数值")]
public bool
{
get
{
return mIsBPShowed;
}
set
{
mIsBPShowed = value;
UIManager.Instance.GetUI<PanelTopBar>().ShowBP(mIsBPShowed);
}
}
[Category("功能")]
public bool
{
get => mIsEditorPlayer;
set
{
mIsEditorPlayer = value;
GameManager.Instance.CurrentEnemyBlockMgr.EnableInteraction(!mIsEditorPlayer);
GameManager.Instance.CurrentEnemyBlockMgr.ShowFloor(!mIsEditorPlayer);
}
}
[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;
}
[Category("人类")]
public void Lv1()
{
CreateHuman(1);
}
[Category("人类")]
public void Lv2()
{
CreateHuman(2);
}
[Category("人类")]
public void Lv3()
{
CreateHuman(3);
}
[Category("人类")]
public void Lv4()
{
CreateHuman(4);
}
[Category("人类")]
public void Lv5()
{
CreateHuman(5);
}
[Category("人类")]
public void Lv6()
{
CreateHuman(6);
}
[Category("人类")]
public void Lv7()
{
CreateHuman(7);
}
//[Category("人类")]
//public void 人Lv8()
//{
// CreateHuman(8);
//}
//[Category("人类")]
//public void 人Lv9()
//{
// CreateHuman(9);
//}
//[Category("人类")]
//public void 人Lv10()
//{
// CreateHuman(10);
//}
private void CreateHuman(int pLevel)
{
if (mIsEditorPlayer)
{
GameManager.Instance.CurrentPlayerBlockMgr.CreateBlockAtRandomPos(BlockType.Human, pLevel);
}
else
{
GameManager.Instance.CurrentEnemyBlockMgr.CreateBlockAtRandomPos(BlockType.Human, pLevel);
}
}
[Category("怪兽")]
public void Lv1()
{
CreateMonster(1);
}
[Category("怪兽")]
public void Lv2()
{
CreateMonster(2);
}
[Category("怪兽")]
public void Lv3()
{
CreateMonster(3);
}
[Category("怪兽")]
public void Lv4()
{
CreateMonster(4);
}
[Category("怪兽")]
public void Lv5()
{
CreateMonster(5);
}
[Category("怪兽")]
public void Lv6()
{
CreateMonster(6);
}
[Category("怪兽")]
public void Lv7()
{
CreateMonster(7);
}
//[Category("怪兽")]
//public void 怪Lv8()
//{
// CreateMonster(8);
//}
//[Category("怪兽")]
//public void 怪Lv9()
//{
// CreateMonster(9);
//}
//[Category("怪兽")]
//public void 怪Lv10()
//{
// CreateMonster(10);
//}
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;
}
}