using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Sirenix.OdinInspector;
using UnityEngine.SceneManagement;

public class DebugHelper : MonoBehaviour
{   
   
   [Header("到此进入下一个场景")]
    public GameObject getHereToContinue;

   void Start() 
   {
        if(ObstacleManager.Instance != null)ObstacleManager.Instance.StartCreatObstacle();
        if(getHereToContinue != null)
            getHereToContinue.AddComponent<GetHereToConut>();
   }

    void Update()
    {
        // 按下R重启场景
        if(Input.GetKeyDown(KeyCode.R))
        {
            Debug.Log("R");
            UnityEngine.SceneManagement.SceneManager.LoadScene(SceneManager.GetActiveScene().name);
        }
    }

    private class GetHereToConut : MonoBehaviour
    {
        private void OnTriggerEnter2D(Collider2D other) {
            SceneManager.LoadScene("0813中期提交");
        }
    }




}
