Upload del repo clone di twang
This commit is contained in:
parent
9c164ceb04
commit
a20252c357
13 changed files with 1873 additions and 0 deletions
37
Lava.h
Normal file
37
Lava.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
#include "Arduino.h"
|
||||
|
||||
class Lava
|
||||
{
|
||||
public:
|
||||
void Spawn(int left, int right, int ontime, int offtime, int offset, char* state);
|
||||
void Kill();
|
||||
int Alive();
|
||||
int _left;
|
||||
int _right;
|
||||
int _ontime;
|
||||
int _offtime;
|
||||
int _offset;
|
||||
long _lastOn;
|
||||
char* _state;
|
||||
private:
|
||||
int _alive;
|
||||
};
|
||||
|
||||
void Lava::Spawn(int left, int right, int ontime, int offtime, int offset, char* state){
|
||||
_left = left;
|
||||
_right = right;
|
||||
_ontime = ontime;
|
||||
_offtime = offtime;
|
||||
_offset = offset;
|
||||
_alive = 1;
|
||||
_lastOn = millis()-offset;
|
||||
_state = state;
|
||||
}
|
||||
|
||||
void Lava::Kill(){
|
||||
_alive = 0;
|
||||
}
|
||||
|
||||
int Lava::Alive(){
|
||||
return _alive;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue