Example #1
0
    private void Awake()
    {
        enemySpawner = GetComponent <EnemySpawner>();
        bulletPool   = GetComponents <PoolObject>();
        bulletPool[0].StartSpawn(gameSettings.GetDamageEnemy);
        bulletPool[1].StartSpawn(gameSettings.GetDamagePlayer);
        playerController = GetComponent <PlayerController>();
        playerController.InitController(player, bulletPool[1], mainUi.EndLosePanel);
        mainUi.InitMainUI(ResetLevel, RestartLevel);
        enemySpawner.InitEnemySpawn(mainUi.EndWinPanel);

        StartLevel();
    }