protected virtual void Awake()
 {
     IsDead = false;
     _cooldownController = GetComponent <PlayerCooldownController>();
     PlayerId            = PlayerIdPool[0];
     PlayerIdPool.RemoveAt(0);
     OnDestroyCallback += () => { };
 }
コード例 #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);
            }
        }
コード例 #3
0
 public void Register(IBaseModuleManager baseManager)
 {
     _onUpdateDelegate  += baseManager.OnUpdate;
     _onDrawDelegate    += baseManager.OnDraw;
     _onDestroyDelegate += baseManager.OnDestroy;
 }