Short game, showcase of OOP (SOLID, DRY) principles, through easy-to-use behaviour system. This game encapsulates efficient way of structuring and keeping the code clean, reusable and intuitive
Periodically higher ups are going to send waves of evil entites, each with different abilities and behaviour. In this game you are in a test chamber, filled with several obstacles and surrounded with walls from all sides
Due to principles of OOP, behaviour building for enemies is very flexible and easy Shortly: Enemies have central behaviour script. Enemy state is mostly defined by how close player is to him
As you see in the example above, this entity has 2 states (Technically 3 if we include idle state, which most of the time is default), for each state we assign behaviour script, range of state activation and animation name associated with that state. In this case there are 2 behaviours
This is the first state. This behaviour is associated with seeker movement, meaning entity will move toward the player if activated
This is the second state. This behaviour is associated with targeted attack, meaning it will have an instant, non projectile based attack
Put together it will look like this https://github.com/Romanumo/AloneInMusic/assets/79278079/b6e25c3e-93c4-4709-9d8b-b65b09db8f3c