SAIMA/Assets//脚本/DebugHelper.cs
Roman 821679433d 任务:针对上次答辩的反馈更新内容
子任务:应付中期检查提交
1.替换场景元素,适配流程
DONE
2.修改大量游戏性参数,使其能玩
DONE
3.增加手柄按键以重开
DONE
4.替换障碍物美术素材
DONE
5.导出可执行文件
DONE
6.编写文档说明本次和上次的区别
DONE
2022-08-13 17:12:45 +08:00

41 lines
939 B
C#

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中期提交");
}
}
}