26 lines
492 B
C#
26 lines
492 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
using System;
|
|
|
|
public class ChangeScene : MonoBehaviour
|
|
{
|
|
float x, y, z;
|
|
|
|
public void MoveToScene(int sceneID)
|
|
{
|
|
SceneManager.LoadScene(sceneID);
|
|
}
|
|
|
|
|
|
|
|
public void OnCollisionEnter2D(Collision2D collision)
|
|
{
|
|
if(collision.gameObject.tag == "SceneTransition")
|
|
{
|
|
DoorBehaviour.Instance.ScenetToMoveTo();
|
|
}
|
|
}
|
|
}
|