First upload

Basic port complete - ESP32 specific features coming soon
This commit is contained in:
bdring
2018-03-19 08:31:45 -05:00
parent 629d362777
commit 23df267c9f
13 changed files with 3048 additions and 0 deletions

35
Spawner.h Normal file
View File

@@ -0,0 +1,35 @@
#include "Arduino.h"
class Spawner
{
public:
void Spawn(int pos, int rate, int sp, int dir, long activate);
void Kill();
int Alive();
int _pos;
int _rate;
int _sp;
int _dir;
long _lastSpawned;
long _activate;
private:
int _alive;
};
void Spawner::Spawn(int pos, int rate, int sp, int dir, long activate){
_pos = pos;
_rate = rate;
_sp = sp;
_dir = dir;
_activate = millis()+activate;
_alive = 1;
}
void Spawner::Kill(){
_alive = 0;
_lastSpawned = 0;
}
int Spawner::Alive(){
return _alive;
}