public void ShowWaveOutro(int waveNr) { WaveCompleteData data = new WaveCompleteData(); data.ammoLeft = new Dictionary <ProjectileType, int>(); // foreach (var item in gameCtrl.turretAmmo) data.ammoLeft.Add(item.Key, item.Value); data.buildingsLeft = new Dictionary <BuildingType, int>(); for (int i = 0; i < System.Enum.GetValues(typeof(BuildingType)).Length; i++) { data.buildingsLeft.Add((BuildingType)i, 0); } foreach (Building item in gameCtrl.buildingCtrl.buildings) { // Debug.Log("bldng: "+ item + ", item.stats.type: " + item.stats.type); data.buildingsLeft[item.stats.def.type] += 1; } data.moneyBonus = gameCtrl.waveCtrl.GetAmountMoneyForWave(gameCtrl.currWaveIdx); // gameCtrl.turretAmmo // data.ammoLeft = waveInfoPanel.ShowWaveOutro(data); // textWaveIntro.color = new Color(1, 1, 1, 1); // textWaveIntro.gameObject.SetActive(true); // textWaveIntro.text = "Wave completed!"; // // StartCoroutine(FadeOutTextCR(textWaveIntro, 0.5f, 2f)); }
public void ShowWaveOutro(WaveCompleteData data) { state = State.OUTRO_START; currData = data; EnableElements(true); textHeader.color = new Color(1, 1, 1, 1); textHeader.text = "Wave complete!"; stateSwitchTime = Time.time + outroStartDuration; }
public void ShowWaveOutro(int waveNr) { WaveCompleteData data = new WaveCompleteData(); data.ammoLeft = new Dictionary<ProjectileType, int>(); // foreach (var item in gameCtrl.turretAmmo) data.ammoLeft.Add(item.Key, item.Value); data.buildingsLeft = new Dictionary<BuildingType, int>(); for (int i = 0; i < System.Enum.GetValues(typeof(BuildingType)).Length; i++) { data.buildingsLeft.Add((BuildingType) i, 0); } foreach (Building item in gameCtrl.buildingCtrl.buildings) { // Debug.Log("bldng: "+ item + ", item.stats.type: " + item.stats.type); data.buildingsLeft[item.stats.def.type] += 1; } data.moneyBonus = gameCtrl.waveCtrl.GetAmountMoneyForWave(gameCtrl.currWaveIdx); // gameCtrl.turretAmmo // data.ammoLeft = waveInfoPanel.ShowWaveOutro(data); // textWaveIntro.color = new Color(1, 1, 1, 1); // textWaveIntro.gameObject.SetActive(true); // textWaveIntro.text = "Wave completed!"; // // StartCoroutine(FadeOutTextCR(textWaveIntro, 0.5f, 2f)); }