SAIMA/Assets//脚本/DebugHelper.cs
Roman 465bb3e51b 任务:编写内容应付中期提交
1.替换部分美术素材
(1.替换新的马
(2.布置背景

2.创建教程场景,说明移动方式、跳跃方式,并陈列目前三种障碍

3.调节脚本优化控制体验

4.新建背景无限循环系统

5.调节各系统参数,使其至少能玩

6.导出一版EXE供提交

7.撰写操作说明

8.录制游戏演示
2022-07-30 20:02:28 +08:00

41 lines
941 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("中期提交场景");
}
}
}