Ejemplo n.º 1
0
 private void Start()
 {
     levelWavesComponent = GetComponent <LevelWaves>();
     timer        = 0f;
     timerUI.text = string.Format("{0:00.00}", ((int)timer).ToString());
     StartCoroutine(CountToStart());
     PickHero();
 }
Ejemplo n.º 2
0
    public void Initialize(LevelWaves levelWaves)
    {
        this.levelWaves = levelWaves;

        // Sets to start first wave.
        started     = true;
        currentWave = -1;
        waveTimer   = 0.0f;

        // Calculates the modifier for scalling dificulty.
        SetScalingDificulty();
    }
Ejemplo n.º 3
0
    // Start is called before the first frame update
    void Start()
    {
        //reset the current wave
        m_curWave = 0;

        //Read the level data from the level json file
        TextAsset textAsset = Resources.Load <TextAsset>("Levels/Level" + m_curLevel);

        m_waves = JsonUtility.FromJson <LevelWaves>(textAsset.text);

        //Start the first wave. This will probably moved to a start button event
        StartWave();
    }