Example #1
0
    IEnumerator StartLevel()
    {
        current_level++;
        arcane_manager.Initialize();

        if (OnNewLevel != null)
        {
            OnNewLevel();
        }

        yield return(StartCoroutine(AnnounceLevel("stage " + current_level)));

        SetDifficulty();

        PlayerAttack.singleton.disabled = false;

        stage_number.text = "Stage " + current_level;

        yield return(new WaitForSeconds(.15f));

        while (monster_left > 0)
        {
            if (monster_count > 0)
            {
                spawner[Random.Range(0, spawner.Count)].Spawn(enemy[0].gameObject, min_drop_speed, max_drop_speed);
                yield return(new WaitForSeconds(Random.Range(min_spawn_cooldown, max_spawn_cooldown)));

                monster_count--;
            }
            yield return(null);
        }

        StartCoroutine("EndLevel");
    }
Example #2
0
    void Start()
    {
        arcane_manager = Arcane.singleton;
        arcane_manager.Initialize();
        arcane_manager.StartArcaneRegen();

        skill_panel_manager = SkillPanelManager.singleton;

        DamageTextManager.Initialize();

        StartCoroutine("StartLevel");
    }