clean logs and improve engine handling by removing hits and movment_delay from the loop to the engine
This commit is contained in:
10
src/ball.cpp
10
src/ball.cpp
@@ -1,6 +1,3 @@
|
||||
#include <Arduino.h>
|
||||
#include <stdint.h>
|
||||
#include "config.h"
|
||||
#include "ball.h"
|
||||
|
||||
void Ball::_init_directions(int8_t &_direction) {
|
||||
@@ -30,6 +27,13 @@ void Ball::bounce_on_sides() {
|
||||
_direction_y *= -1;
|
||||
}
|
||||
|
||||
int8_t Ball::get_direction_x() {
|
||||
return _direction_x;
|
||||
}
|
||||
int8_t Ball::get_direction_y() {
|
||||
return _direction_y;
|
||||
}
|
||||
|
||||
void Ball::reset_position () {
|
||||
_x= BALL_RESET_X;
|
||||
_y= BALL_RESET_Y;
|
||||
|
||||
Reference in New Issue
Block a user