feat(Cycle):实现循环提前检测,修复交互提示消失,按键绑定的事件在重启的时候没能正确,触发循环的提前检测有错误
This commit is contained in:
@@ -9,13 +9,18 @@ namespace Script.Gameplay.Global
|
||||
private const string LoopCountKey = "TotalLoopCount";
|
||||
public int TotalLoopCount { get; private set; }
|
||||
|
||||
private void Start()
|
||||
protected override void Awake()
|
||||
{
|
||||
GameManager.Instance.OnGameStart += AddLoop;
|
||||
base.Awake();
|
||||
// 读取已保存的循环次数
|
||||
TotalLoopCount = PlayerPrefs.GetInt(LoopCountKey, 0);
|
||||
Debug.Log("目前循环次数:" + TotalLoopCount);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
GameManager.Instance.OnGameStart += AddLoop;
|
||||
}
|
||||
|
||||
public void AddLoop()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user