Пример #1
0
    void Awake()
    {
        if (instance == null)
            instance = this;
        else
            Destroy(this);

        ActivePool = new List<PickupBase>();
        InActivePool = new List<PickupBase>();
    }
Пример #2
0
    public void Initialize()
    {
        if (!InitializeSingleton(this))
        {
            return;
        }

        TRexPool      = GetComponentInChildren <TRexPool>();
        AsteroidPool  = GetComponentInChildren <AsteroidPool>();
        PickupPool    = GetComponentInChildren <PickupPool>();
        QuicksandPool = GetComponentInChildren <QuicksandPool>();
    }
Пример #3
0
 void Update()
 {
     if (instance == null)
         instance = this;
 }