Ejemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     pool            = GetComponent <PoolManagerObjects>();
     playerComponent = GetComponent <PlayerComponent>();
     time            = 60 / dpm;
     currentTime     = time;
 }
 // Start is called before the first frame update
 void Start()
 {
     pool           = GetComponent <PoolManagerObjects>();
     enemyComponent = GetComponent <EnemyComponent>();
     time           = 60 / dpm;
     currentTime    = time;
 }
Ejemplo n.º 3
0
    // Start is called before the first frame update
    void Start()
    {
        enemySpawnPos = Camera.main.ViewportToWorldPoint(new Vector2(0.5f, 1));
        enemyLimitPos = Camera.main.ViewportToWorldPoint(new Vector2(0.5f, 0));
        Vector3 startPos = Camera.main.ViewportToWorldPoint(new Vector2(0.5f, 0.2f));

        startPos = new Vector3(startPos.x, startPos.y, 0);
        Instantiate(playerComponentPrefab, startPos, Quaternion.identity);

        foreach (var enemyPrefab in enemiesPrefab)
        {
            PoolManagerObjects poolManagerObjects = gameObject.AddComponent <PoolManagerObjects>();
            poolManagerObjects.objPrefab = enemyPrefab.gameObject;
            poolManagerObjects.poolSize  = 10;

            poolManagerFictionary.Add(enemyPrefab.enemyType, poolManagerObjects);
        }
    }
Ejemplo n.º 4
0
 public void SetPoolManager(PoolManagerObjects poolManagerObjects)
 {
     this.poolManagerObjects = poolManagerObjects;
 }