Best way to play infinite random battle rounds
Hi there,
I'm currently working on a 2D Game in Unity, and have some difficulties finding the best model to run those kinds of round.
The game consists of having different rounds (like waves in tower defense), where the player have to kill all the enemies by clicking on them. Each round can behave differently, like one where there is a chrono and have X seconds to kill most enemies.
Actually, I have a Round abstract class extending Monobehaviour (since my enemies send events to this class to count death), with base functionnality of the round, like counting remaining enemies, and an abstract coroutine describing each round different gameplay.
In my GameManager class, I have a Gameloop coroutine chaining random rounds, by creating an empty GameObject, and adding specific round component with specific values depending on level difficulty.
But I don't think this is the best solution to create and destroy a gameobject for each round, and each round have different fields that I need to initialize with a custom function fo each one of them.
Does someone can suggest me a better approach for handling these rounds?
Thank you very much !
Your answer
Follow this Question
Related Questions
C# Abstract methods with default parameters 1 Answer
How to prevent a method from delaying Update()? 1 Answer
Add points every five seconds 1 Answer
Coroutine for particle system Itween path? 1 Answer
How to stop audio in coroutine unity 0 Answers