| 123456789101112131415161718192021222324252627 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.Events;
- public class MonoManager : MonoSingleton<MonoManager>
- {
- private event UnityAction updateEvent;
- private void Update()
- {
- if (updateEvent != null)
- {
- updateEvent();
- }
- }
- public void AddUpdateListen(UnityAction action)
- {
- updateEvent += action;
- }
- public void RemoveUpdateListen(UnityAction action)
- {
- updateEvent -= action;
- }
- }
|