Engineers - UQcsse3200/2023-studio-3 GitHub Wiki
Introduction
Engineers are semi-playable characters in the game. Engineers are spawned when there are no towers and there are engineers to spawn. An engineer can be selected by clicking on the engineer, and a blue outline will appear showing that the engineer has been clicked. Engineers can be created using an EngineerFactory. Engineers can be moved around the game map by left clicking. If the user clicks the key p then the engineer will stop in place. Engineers automatically shoot oncoming mobs when they approach.
Engineer input is handled in the EngineerInputComponent, a class which listens for inputs from the user. The main part of this class is handling touchDown(), checking what to do when the user clicks somewhere on the screen. If the user clicks on the engineer (that is already selected), a menu will appear showing what the engineer can do.
Development
There a some engineer related classes, namely:
- EngineerInputComponent: Handling user input relating to engineers
- EngineerFactory: Builds the engineers from a base entity
- GameEndService: The service which checks if the game is ended (when total engineers is 0)
- EngineerCombatTask - The task dealing with engineers in combat.
- HumanWanderTask - The task dealing with Human movement, acting as a controller.
- HumanWaitTask - Task dealing with engineers during an idle event.
- HumanMovementTask - Task dealing with movement of engineers.
- HumanAnimationController - Controller dealing with animations and movement.
UML
Updated UML (as of Sprint 4)