mly2023cheat/CheatOpeningView.cs

31 lines
787 B
C#
Raw Normal View History

2023-08-24 14:33:32 +08:00

using UnityEngine;
namespace Mly.Hotfix
{
public class CheatOpeningView: MonoBehaviour
{
public bool SkipPrologue;
void Awake()
{
SkipPrologue = PlayerPrefs.GetInt("Cheat_SkipPrologue", 0) == 1;
}
public void OnGUI()
{
var style = CheatUtil.GetGUIButtonStyle();
style.normal.textColor = Color.white;
style.fontSize = 30;
var val = GUI.Toggle(new Rect(10, 100, 300, 100), SkipPrologue, SkipPrologue ? "跳过序章中" : "点击跳过序章", style);
if (val != SkipPrologue)
{
SkipPrologue = val;
PlayerPrefs.SetInt("Cheat_SkipPrologue", SkipPrologue ? 1 : 0);
}
}
}
}