Class CollisionHandler
java.lang.Object
com.csse3200.game.minigames.birdiedash.collision.CollisionHandler
Class to detect and track collisions in birdie dash mini-game
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks if collisions with non-game terminating objectsDetermines if the bird is touching the spikesint
getScore()
Gets the current game scoreboolean
Gets whether collision is detected.
-
Constructor Details
-
CollisionHandler
-
-
Method Details
-
checkCollisions
public void checkCollisions()Checks if collisions with non-game terminating objects -
checkSpikes
Determines if the bird is touching the spikes- Returns:
- tru if bird is touching spikes otherwise false.
-
getScore
public int getScore()Gets the current game score- Returns:
- the score
-
isCollisionDetected
public boolean isCollisionDetected()Gets whether collision is detected. Used for testing- Returns:
- boolean for collision detection
-