123456789101112131415161718192021222324 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class GameSrartEvent : MonoBehaviour
- {
- private static Action mOnEvent;
- public static void Register(Action onEvent)
- {
- mOnEvent += onEvent;
- }
- public static void UnRegister(Action onEvent)
- {
- mOnEvent -= onEvent;
- }
- public static void Trigger()
- {
- mOnEvent?.Invoke();
- }
- }
|