A generic pooling script to control gameobject's activations and to avoid instantiate and destroy gameobjects many times.
Inheritance: BaseScript
 void Awake()
 {
     enemyPool        = new GenericPooling <Enemy>();
     allyPool         = new GenericPooling <Ally>();
     archerTurretPool = new GenericPooling <ArcherTurret>();
     mageTurretPool   = new GenericPooling <MageTurret>();
     arrowPool        = new GenericPooling <Arrow>();
     popupPool        = new GenericPooling <PopupText>();
 }
Exemplo n.º 2
0
    private void Awake()
    {
        Instance = this;

        //do any initialization before here
        if (PoolInitialized != null)
        {
            Debug.Log("Pool Initialized");
            PoolInitialized.Invoke();
        }
    }
Exemplo n.º 3
0
 private void Awake()
 {
     Instance = this;
 }