Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Enemy/Enemy.cpp
- Revision:
- 23:9be87557b89a
- Parent:
- 20:a359092079b0
- Child:
- 29:15e9640646b7
--- a/Enemy/Enemy.cpp Mon May 06 11:21:39 2019 +0000 +++ b/Enemy/Enemy.cpp Wed May 08 08:46:11 2019 +0000 @@ -11,7 +11,25 @@ } void Enemy::draw(N5110 &lcd){ - lcd.drawCircle(_position.x, _position.y, _radius, FILL_TRANSPARENT); + const int image [16][16] = { + {0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0}, + {0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0}, + {0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0}, + {0,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0}, + {0,0,1,0,1,0,0,0,0,0,0,1,0,1,0,0}, + {0,0,1,0,1,1,1,0,0,1,1,1,0,1,0,0}, + {0,0,1,0,1,1,1,0,0,1,1,1,0,1,0,0}, + {0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0}, + {0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0}, + {0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0}, + {0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0}, + {0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0}, + {0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0}, + {0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,0}, + {0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0}, + {0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0}, + }; + lcd.drawSprite(_position.x, _position.y, 16, 16,(int*)image); } void Enemy::update(float floor_pos_x, float floor_pos_y){ // decides if it gets erased