protected virtual void Awake()
 {
     IsDead = false;
     _cooldownController = GetComponent <PlayerCooldownController>();
     PlayerId            = PlayerIdPool[0];
     PlayerIdPool.RemoveAt(0);
     OnDestroyCallback += () => { };
 }
Beispiel #2
0
        public static void OnDestroyEvent(this MonoBehaviour target, OnDestroyDelegate @delegate)
        {
            lock (mbs)
            {
                if (!mbs.ContainsKey(target))
                {
                    mbs.Add(target, new MBEvents(target));
                }

                mbs[target].OnDestroys.Add(@delegate);
            }
        }
 public void Register(IBaseModuleManager baseManager)
 {
     _onUpdateDelegate  += baseManager.OnUpdate;
     _onDrawDelegate    += baseManager.OnDraw;
     _onDestroyDelegate += baseManager.OnDestroy;
 }