Howest Geometry-wars project
Killian Meersman
Timo Vergauwen
Lowiek Lemay
Robin De Neef
This project uses several design patterns. SpriteActor is a child class of LibGDX's Actor class and has a Sprite that always has the same position, rotation and scale as the Actor itself. This class uses the Strategy Pattern to define four of its core behaviours. Each of these behaviours is stored in a class field.
- MovementBehavior - Defines how the actor moves
- AttackBehavior - Defines how the actor attacks
- HealthBehavior - Defines how the actor responds to damage
- CollisionBehavior - Defines what the actor collides with, currently ony 1-way (if it does not collide with ex. EnemyActors an EnemyActor can still collide with it)
We do this by defining an abstract class (all behaviours need an owner field) and overriding this class as we need more behaviours. If an actor does not have a certain bahevior (ex. It does not move), then it will have a behavior called No<behavior name> (Ex. NoMovement)