Projectile Library
Diff: Projectile.cpp
- Revision:
- 7:50b6d2c95156
- Parent:
- 6:70b35ebfa8c8
- Child:
- 8:36610092060f
diff -r 70b35ebfa8c8 -r 50b6d2c95156 Projectile.cpp --- a/Projectile.cpp Tue May 02 16:24:52 2017 +0000 +++ b/Projectile.cpp Wed May 03 13:32:42 2017 +0000 @@ -32,27 +32,20 @@ //printf("playerxy projdraw = %d %d \n", _playerx, _playery); - if(_x <= -1){ - m = 0; - } - if(_x >= 85){ - m = 0; - } + if(_y <= -1){ m = 0; } - if(_y >= 49){ - m = 0; - } + if(m == 0){ - _x = _playerx +1; // Middle of screen // Change these values to change starting position - _y = _playery +1; // Near bottom of screen + _x = _playerx +2; // Middle of screen // Change these values to change starting position + _y = _playery; // Near bottom of screen m = m+1; } - lcd.drawRect(_x,_y,1,1,FILL_BLACK); + lcd.drawRect(_x,_y,2,2,FILL_BLACK); //printf("projdrawn %d %d \n", _x, _y); //printf("playerpos in proj = %d %d \n", playerx, playery);