Reward System Implemented and Project Refactoring


Reward System Implemented and Project Refactoring

This week I went though the code of the game and did a huge refactoring on how everything is organised. 

One example of this refactoring is the Enemies Scripts. So right now I have a class called Ship which contains the necessary code for any ship including the Player. Then Enemy Class extends all the functionality and variables from Ship and add all the functionality that my Enemy ships like Their rotations and What happens when they got destroyed. In addition I have been thinking of how I will approach the implementation of each enemy movement. I have different kind of enemy and each move and act differently. My approach in this refactoring was that each enemy have a class which extends the functionality of Enemy but overrides the movement and initialization of the enemy ship.

The same thing I did for the weapon system that I created. 

Last but not least I implemented a Reward System which will reward the player something each wave. Its a card based reward where he will press one of the three to reveal the reward. The rewards are random and recreated every time. Right now I only Include 4 kind of reward but this is easy expendable. 


That is all for this week. I am going to be doing more refactoring until I like how everything works. 

Until next time.