Class MazePhysicsUtils

java.lang.Object
com.csse3200.game.minigames.maze.physics.MazePhysicsUtils

public class MazePhysicsUtils extends Object
Useful utility functions for physics in the maze mini-game.
  • Method Details

    • setScaledOvalCollider

      public static void setScaledOvalCollider(Entity entity, float scaleX, float scaleY)
      Set the collider to the base of the entity, scaled relative to the entity size.
      Parameters:
      entity - the entitie to set the collider for
      scaleX - the x scale
      scaleY - the y scale
    • setScaledHitBox

      public static void setScaledHitBox(Entity entity, float scaleX, float scaleY)
      Set the hitbox to the base of the entity, scaled relative to the entity size.
      Parameters:
      entity - the entitie to set the hitbox for
      scaleX - the x scale
      scaleY - the y scale
    • setScaledColliderAndHitBox

      public static 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.
      Parameters:
      entity - the entitie to set the hitbox and collider for
      scaleX - the x scale
      scaleY - the y scale