mly2023cheat/CheatStoryTypeView.cs

42 lines
1.2 KiB
C#
Raw Normal View History

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

using UnityEngine;
namespace Mly.Hotfix
{
public class CheatStoryTypeView : MonoBehaviour
{
public bool SkipStory;
public bool UnLockAllStory;
private GUIStyle _GUIStyle;
public void Awake()
{
SkipStory = PlayerPrefs.GetInt("SkipStory", 0) == 1;
UnLockAllStory = PlayerPrefs.GetInt("UnLockAllStory", 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), SkipStory, SkipStory ? "跳过剧情中" : "点击跳过剧情", style);
var val2 = GUI.Toggle(new Rect(10, 300, 300, 100), UnLockAllStory, UnLockAllStory ? "解锁全部剧情中" : "点击解锁全部剧情", style);
if (val != SkipStory)
{
SkipStory = val;
PlayerPrefs.SetInt("SkipStory", SkipStory ? 1 : 0);
}
if (val2 != UnLockAllStory)
{
UnLockAllStory = val2;
PlayerPrefs.SetInt("UnLockAllStory", UnLockAllStory ? 1 : 0);
}
}
}
}