Push - UQdeco2800/2022-studio-2 GitHub Wiki
Push Code
Push details
The push skill is a utility skill which allows the player to push all surrounding enemies away from them and create space. It is functionally identical to the projectile implementation, just with more knockback, a larger hitbox, and no movement.
Spawning push hitbox
When the skill is used the skill handler calls the below function to spawn the push hitbox over the player. The hitbox is then immediately removed so enemies won't keep running into it.
public void aoeAttack() {
if (ServiceLocator.getGameArea().getClass() == ForestGameArea.class) {
Entity projectile = ((ForestGameArea) ServiceLocator.getGameArea()).spawnPlayerAOE();
ForestGameArea.removeProjectileOnMap(projectile);
}
}