Attack Of Zombies: Police and Soldier
Implemented a human attack logic, and imported some new prefabs.
7/3/20241 min read
After the last update on my game I have improved human spawner to spawn humans if the central human gets killed during the gameplay, but I limited the number of respawns to make sure there is an end to the level. Yesterday after that, I have started the implementation of human attack, meaning I needed new prefabs so I imported a police prefab.
Then, today I have imported soldier prefab. These two prefabs are different than other humans. Instead of running from the zombies they fight them. That where the human attack implementation came in. Luckily, I was able to finish the human attack implementation today. While I was working on my attack implementation I realized that my code can be optimized, because I was using monobehaviour scripts for almost every script. Then, I added interfaces and base classes to optimize my game. Thus, I have changed the scripts responsible for humans turning zombie, human spawning, zombie health, human attack. In the way I have added 2 different types of human spawning for spawning police and soldier.





