Arturs Kozlovskis 201253737
Functions Class Reference
#include <Functions.h>
Public Member Functions | |
| Functions () | |
| Constructor. | |
| void | ball_position_parabolic (N5110 &lcd, Objects &objects, Gamepad &pad, int c) |
| Draw parabolic ball. | |
| void | ball_position_linear (N5110 &lcd, Objects &objects, Gamepad &pad, int c) |
| Draw linear ball. | |
| void | collision_checker (N5110 &lcd, Objects &objects, Gamepad &pad) |
| Check for collisions. | |
| void | ball1_finder (int x, int y) |
| Find the collided ball(linear) | |
| void | ball_finder (int x, int y) |
| Find the collided ball(parabolic) | |
| bool | cannon_smash (N5110 &lcd, Objects &objects) |
| Check if cannon has been hit. | |
| int | random (Gamepad &pad) |
| Generate a random value. | |
| void | ball_creater_linear (N5110 &lcd, Objects &objects, Gamepad &pad) |
| Govern the linear ball movement and creation. | |
| void | ball_creater_parabolic (N5110 &lcd, Objects &objects, Gamepad &pad) |
| Govern the parabolic ball movement and creation. | |
| int | round (float number) |
| Round a value. | |
| int | get_score () |
| Get score. | |
Detailed Description
Functions class.
Contains the game engine
- Date:
- April,2020
Definition at line 39 of file Functions.h.
Constructor & Destructor Documentation
| Functions | ( | ) |
Constructor.
Definition at line 21 of file Functions.cpp.
Member Function Documentation
| void ball1_finder | ( | int | x, |
| int | y | ||
| ) |
Find the collided ball(linear)
- Parameters:
-
x value of pixel that caused the collision y value of pixel that caused the collision
Definition at line 162 of file Functions.cpp.
Govern the linear ball movement and creation.
Definition at line 349 of file Functions.cpp.
Govern the parabolic ball movement and creation.
Definition at line 423 of file Functions.cpp.
| void ball_finder | ( | int | x, |
| int | y | ||
| ) |
Find the collided ball(parabolic)
- Parameters:
-
x value of pixel that caused the collision y value of pixel that caused the collision
Definition at line 187 of file Functions.cpp.
Draw linear ball.
- Parameters:
-
N5110 class object Objects class object Gamepad class object c tell the function which ball to chose from(int)
Definition at line 124 of file Functions.cpp.
Draw parabolic ball.
- Parameters:
-
N5110 class object Objects class object Gamepad class object c tell the function which ball to chose from(int)
Definition at line 54 of file Functions.cpp.
Check if cannon has been hit.
- Returns:
- bool if collision has happened or not(bool)
Definition at line 212 of file Functions.cpp.
Check for collisions.
Definition at line 141 of file Functions.cpp.
| int get_score | ( | ) |
| int random | ( | Gamepad & | pad ) |
Generate a random value.
- Parameters:
-
Gamepad class object
- Returns:
- a random value in range of 0 to 100(int)
Definition at line 293 of file Functions.cpp.
| int round | ( | float | number ) |
Round a value.
- Parameters:
-
Number value that needs rounding
- Returns:
- a rounded value of passed value
Definition at line 453 of file Functions.cpp.
Generated on Thu Jul 14 2022 06:47:19 by
1.7.2