上海虹口龙之梦项目
 
 
 
 

19 lines
485 B

using UnityEngine;
public class Main : MonoBehaviour
{
public static LocationSimulator LocationSimulator { get; private set; }
public static EventManager Event { get; set; }
private void Awake()
{
DontDestroyOnLoad(this);
LocationSimulator = GetComponentInChildren<LocationSimulator>();
Event = GetComponentInChildren<EventManager>();
}
private void OnDestroy()
{
Event = null;
LocationSimulator = null;
}
}