NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/Debug/SROptions.GM.cs

128 lines
2.6 KiB
C#

using System.ComponentModel;
using Code.Scripts.Gameplay.Game;
using Gameplay.Character;
using Gameplay.Common;
public partial class SROptions
{
private bool _useFullCharacters;
[Category("GM"), DisplayName("使用全角色")]
public bool UseFullCharacters
{
get { return _useFullCharacters; }
set
{
_useFullCharacters = value;
}
}
[Category("GM"), DisplayName("己方无敌")]
public bool SelfUnbeatable
{
get { return _selfUnbeatable; }
set
{
_selfUnbeatable = value;
}
}
private bool _selfUnbeatable = false;
[Category("GM"), DisplayName("敌方无敌")]
public bool EnemyUnbeatable
{
get { return _enemyUnbeatable; }
set
{
_enemyUnbeatable = value;
}
}
private bool _enemyUnbeatable = false;
private int _emojiId;
[Category("GM"), DisplayName("表情ID")]
public int EmojiId
{
get { return _emojiId; }
set
{
if (_emojiId.Equals(value)) return;
_emojiId = value;
SetEmoji();
}
}
[Category("GM"), DisplayName("设置表情")]
public void SetEmoji()
{
var allUnits = GameUnitMapper.Inst.unitList;
for (int i = 0; i < allUnits.Count; i++)
{
var unit = allUnits[i];
if (unit.gameunitType != EGameUnitType.Character) continue;
if (unit is Character character)
character.emojiManager.SwitchEmoji(_emojiId);
}
}
[Category("GM"), DisplayName("机器人数据初始化")]
public void SendRobotTestInit()
{
if(UnityEngine.Application.isPlaying)
{
Gameplay.Net.NetHelper.RobotTestInit();
}
}
[Category("GM"), DisplayName("进入测试剧情")]
public void EnterStory()
{
GameStateManager.Instance.ChangeState(new GameStateStory(1));
}
private string gc;
[Category("礼包兑换")]
public string GiftCode { get { return gc; } set { gc = value; }}
[Category("礼包兑换")]
public void DoGiftCode()
{
if(UnityEngine.Application.isPlaying)
{
Gameplay.Net.NetHelper.GiftCode(GiftCode);
}
}
[Category("屏幕适配"), DisplayName("显示UI适配安全区域")]
public bool IsShowScreenSafeArea
{
get
{
return DebugScreen.Instance.IsShowSafeArea;
}
set
{
DebugScreen.Instance.IsShowSafeArea = value;
DebugScreen.Instance.DebugChangeShowAreaState();
}
}
}