Ejemplo n.º 1
0
    private IEnumerator LevelStartCountdown()
    {
        EndLevel();
        PlayerSpawner.UnlockSpawner();
        OpponentSpawner.UnlockSpawner();
        UIManagerService.GetInstance().ShowTilesContainer();
        SplashLabel.color = new Color(1f, 1f, 1f);
        TimerLabel.gameObject.SetActive(true);
        SplashLabel.gameObject.SetActive(true);
        SplashLabel.text = "Level Starting In...\n3";
        yield return(new WaitForSeconds(1));

        SplashLabel.text = "Level Starting In...\n2";
        yield return(new WaitForSeconds(1));

        SplashLabel.text = "Level Starting In...\n1";
        yield return(new WaitForSeconds(1));

        SplashLabel.text = "GO!";
        TileManagerService.GetInstance().InitTiles();
        TileManagerService.GetInstance().IsLocked     = false;
        GroundClaimsService.GetInstance().TrackClaims = true;
        OpponentScriptedSpawner.StartSpawning();
        StartCoroutine(UpdateTimer());
        yield return(new WaitForSeconds(1));

        SplashLabel.text = "";
    }
    private IEnumerator UnlockSpawnerAfter(float t)
    {
        yield return(new WaitForSeconds(t));

        OpponentSpawner.UnlockSpawner();
    }