You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
551 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Map : MonoBehaviour
{
public static Map instance;
public bool openingState;
public int[] nextMissions;
public Character mainCharacter;
private void Awake()
{
if(instance ==null)
instance = this;
else if(instance != this)
Destroy(gameObject);
}
public void LoadScene(int index)
{
SceneManager.LoadScene(nextMissions[index]);
}
}