void EndWave() { if (IsLastWave) { base.SetBattleEnd(); SetBattleEndStage(); return; } WaveStartTime = 0f; IsBattleStart = false; float delay = 1.0f; var end_bundle = BattleBase.Instance.tween_system.GetBundle("end"); end_bundle.Delay = delay; foreach (var creature in characters) { BattleCreature battle_creature = creature as BattleCreature; battle_creature.Clear(); if (creature.IsDead == false) { end_bundle.Play(creature.Character.GetComponent <HFX_TweenSystem>(), creature.Character.transform, null, 1f); int heal = Mathf.RoundToInt(battle_creature.Stat.MaxHP * GameConfig.Get <float>("wave_heal")); if (heal > 0) { battle_creature.SetWaveHeal(heal); TextManager.Instance.PushHeal(battle_creature, heal, eTextPushType.Normal); } } } foreach (var creature in enemies) { if (creature != null) { (creature as BattleCreature).Clear(); if (creature.IsDead == false) { end_bundle.Play(creature.Character.GetComponent <HFX_TweenSystem>(), creature.Character.transform, null, 1f); } } } WaveEndTime = Time.time + 2f + delay; foreach (var creature in m_LightingCreatures) { creature.SetEnd(true); } }