| 123456789101112131415161718192021 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class GlobalEventCenter : MonoBehaviour
- {
- public System.Action onGameSceneLoad;
- public System.Action onGameSceneDestroy;
- public System.Action<bool> onSimulateMouseAwakeChanged; //Param0:激活/熄灭
- private static GlobalEventCenter _ins;
- public static GlobalEventCenter ins {
- get {
- if (!_ins) {
- _ins = new GameObject("GlobalEventCenter").AddComponent<GlobalEventCenter>();
- DontDestroyOnLoad(_ins);
- }
- return _ins;
- }
- }
- }
|