Class MazePhysicsUtils
java.lang.Object
com.csse3200.game.minigames.maze.physics.MazePhysicsUtils
Useful utility functions for physics in the maze mini-game.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
setScaledColliderAndHitBox
(Entity entity, float scaleX, float scaleY) Set the hitbox and collider to the base of the entity, scaled relative to the entity size.static void
setScaledHitBox
(Entity entity, float scaleX, float scaleY) Set the hitbox to the base of the entity, scaled relative to the entity size.static void
setScaledOvalCollider
(Entity entity, float scaleX, float scaleY) Set the collider to the base of the entity, scaled relative to the entity size.
-
Method Details
-
setScaledOvalCollider
Set the collider to the base of the entity, scaled relative to the entity size.- Parameters:
entity
- the entitie to set the collider forscaleX
- the x scalescaleY
- the y scale
-
setScaledHitBox
Set the hitbox to the base of the entity, scaled relative to the entity size.- Parameters:
entity
- the entitie to set the hitbox forscaleX
- the x scalescaleY
- the y scale
-
setScaledColliderAndHitBox
Set the hitbox and collider to the base of the entity, scaled relative to the entity size.- Parameters:
entity
- the entitie to set the hitbox and collider forscaleX
- the x scalescaleY
- the y scale
-