2022-05-10 22:54:04 +02:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.SceneManagement;
|
2022-05-15 16:40:58 +02:00
|
|
|
using System;
|
2022-05-10 22:54:04 +02:00
|
|
|
|
|
|
|
public class ChangeScene : MonoBehaviour
|
|
|
|
{
|
|
|
|
public void MoveToScene(int sceneID)
|
|
|
|
{
|
|
|
|
SceneManager.LoadScene(sceneID);
|
|
|
|
}
|
2022-05-15 16:40:58 +02:00
|
|
|
|
|
|
|
public void OnCollisionEnter2D(Collision2D collision)
|
|
|
|
{
|
|
|
|
if(collision.gameObject.tag == "SceneTransition")
|
|
|
|
{
|
|
|
|
DoorBehaviour.Instance.ScenetToMoveTo();
|
|
|
|
}
|
|
|
|
}
|
2022-05-10 22:54:04 +02:00
|
|
|
}
|