シーンロード(デバッグ用)追加

This commit is contained in:
kimura 2021-07-09 10:06:38 +09:00
parent 86fd7c9b2c
commit 46feafdcb4
1 changed files with 16 additions and 1 deletions

View File

@ -4,7 +4,6 @@ using UniRx;
using UniRx.Triggers;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public enum GameState
@ -59,6 +58,22 @@ public class PopcornGameManager : MonoBehaviour
}).AddTo(this);
ResetGame();
#if UNITY_EDITOR
this.UpdateAsObservable()
.Where(_ => Input.GetKeyDown(KeyCode.R))
// 連打防止
.ThrottleFirst(TimeSpan.FromSeconds(0.1f))
.Subscribe(_ => UnityEngine.SceneManagement.SceneManager.LoadScene("Cooking"))
.AddTo(this);
this.UpdateAsObservable()
.Where(_ => Input.GetKeyDown(KeyCode.E))
// 連打防止
.ThrottleFirst(TimeSpan.FromSeconds(0.1f))
.Subscribe(_ => ResetGame())
.AddTo(this);
#endif
}
private void ResetUI()