Ejemplo n.º 1
0
        private void Awake()
        {
            enemies.TimeBetweenWaves = JsonWorker.Deserialize <ConfigFile>("config.txt").timeBetweenWaves;

            _player = new Player();
            _player.SetStartHealth(startPlayerHealth);

            _player.OnPlayerDeath += () =>
            {
                enemies.Stop();
                OnEndGame?.Invoke(enemies.KilledEnemiesCount);

                Time.timeScale = 0;
            };
        }