Im developing a turn based game. Its based on a boardgame where you controll some character that are survivours an the enemy (computer) controls zombies. I`ve made a function that controls the zombies in enemies turn and moves them to reach the survivous. It does it automatically. What i need to perform is the following:
In enemis turn instead of procesing all automaticalli and show me the zombies already moved at the end of the turn, i want the camera tu focus one by one all the zombies and show the movement, one by one! until all the zombies have moved.
i have a funcion that uses a "foreach (zombie) do Move " .
How can i do this? any idea? Ive tried moving the camera to the location of each zombie before they move but it all happens very fast and im not able to see it.
Thanks to all!
The turn of the enemy should look like in this game, they move one by one making their stuff
Without more details I can’t give you more then that. Please note that the forums are better suited for general design questions. UA is for specific technical details.
Thanks to all! Ill post some code and explain it better:
When i finish my turn making click on a button (finish turn) it goes to the following:
void StartZombiesTurn (){
PerformZombieActions (); //the zombies move or attack
ActivateSpawners (); //the zombies appear in the spawners
}
Here is the code of perform actions:
void PerformZombieActions(){
zombies = null; //Sets "zombies" (List<Zombie>) to null
zombies = boardManager.GetAllZombiesInGame ();
if (zombies.Count != null) {
foreach (Zombie z in zombies){
//each zombie has an amount of actions;
//this for is to make one action for each action available
for(int x = 0; x< z.GetActions(); x++){
z.MakeAction();
}
}
}
}
All this works correctly, excepting that i cant see it step by step. Thanks to all of you!