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); } } } }