Hello everybody, after reading some posts about this lesson, I used one comment of Code Monkey to create the proposed solution. Original post below:
The solution.
-
In UnitActionSystem.cs scritp, in Start, listen to the turn change event.
-
On the page end, implement the new function as in the followinf image
With this cose the next unit will be selected if the current one is dead. If all are dead there is a debug line sayng the game is over.
Thanks to Hugo for the tip!