Files
twang-mp/Conveyor.h
bdring 97341671b9 Added web server and serial port setup
- Access game stats via wifi access point and web server
- Setup game preferences via serial port (EEPROM issue causes
crashes...help me fix). Does not affect game normal play.
- Updated to recent stuff on Arduino port.
2018-03-22 11:16:47 -05:00

25 lines
524 B
C++

#include "Arduino.h"
#include "settings.h"
class Conveyor
{
public:
void Spawn(int startPoint, int endPoint, int speed);
void Kill();
int _startPoint;
int _endPoint;
int _speed;
bool _alive;
};
void Conveyor::Spawn(int startPoint, int endPoint, int speed){
_startPoint = startPoint;
_endPoint = endPoint;
_speed = constrain(speed, -MAX_PLAYER_SPEED+1, MAX_PLAYER_SPEED - 1); // must allow some player speed
_alive = true;
}
void Conveyor::Kill(){
_alive = false;
}