[DEV] Enemy Rework

Enemy Script

The enemies have been a struggle since the beginning, with a script that kept growing in size, the bugs kept appearing whenever something was changed.
Therefor, Brecht, Nick and I have been sitting together to rework the entire script. It has now been divided into smaller scripts that define the behaviour of the enemy, depending on its type (i.e. Ranged or Melee, Shield or no Shield, Patrol or Guard). This increases maintainability and readability by a lot, and writing the script from scratch gave us more insight in where each bug might be coming from.

Enemy Generator

Since there are 3 enemy models, each with 3 possible weapons, and the option to have a shield, creating a prefab for each type would clutter our prefab list. Therefor, I’ve created a script which allows us to easily generate a different enemy model in edit mode.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s