bouncing_box.girder_manager module¶
A module that contains the class and functions for the GirderManager.
-
class
GirderManager
¶ Bases:
object
This class contains all of the functions and variables that is used by the GirderManager.
-
checkForScore
(playerX)¶ A function to check if the girder scores a point.
- Parameters
playerX (float) – The player’s X position.
- Returns
A boolean for if the player scores a point.
- Return type
bool
-
collisionCheck
(playerPos, playerDim)¶ A function to check for girder collision.
- Parameters
playerPos (class:pygame.math.Vector2) – The player’s position.
playerDim (class:pygame.math.Vector2) – The player’s Dimensions.
- Returns
If there is a collision.
- Return type
bool
-
draw
(screen)¶ A function to draw the Girders to the screen.
- Parameters
screen (class pygame.Surface) – The screen to draw to.
-
resetGirders
()¶ A function to reset the positions of the girders.
-
spawnNew
()¶ A function for spawning the new girders.
-
spawnThread
()¶ A function for spawning the girders every two seconds.
-
startGirdersMoving
()¶ A function to start all the girders moving.
-
startSpawing
()¶ A function to start the Girders spawning.
-
stopGirdersMoving
()¶ A function to stop all the girders moving.
-
stopSpawing
()¶ A function to stop the Girders from spawning.
-
update
(dt)¶ A function to update the Girders.
- Parameters
dt (float) – The delta time.
-