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.
Diff: Weapons/Weapons.cpp
- Revision:
- 85:87bc28b151d8
- Parent:
- 82:3211b31e9421
diff -r f61c85a5f13a -r 87bc28b151d8 Weapons/Weapons.cpp --- a/Weapons/Weapons.cpp Tue May 26 14:39:45 2020 +0000 +++ b/Weapons/Weapons.cpp Tue May 26 19:38:48 2020 +0000 @@ -10,7 +10,7 @@ void Weapons::init(Vector2D sprite_pos, bool sprite_direction, bool bullet_type) { - // Bullet for alien or for spacship + // Bullet for alien or for spaceship set_direction(sprite_direction); if (bullet_type) { calc_bullets_start_pos(sprite_pos, sprite_direction); @@ -51,7 +51,7 @@ void Weapons::draw_bullet(N5110 &lcd) { // Draws then moves the bullet position lcd.drawLine(position_x_, position_y_, position_x_+1, position_y_, 1); - if(direction_) { + if (direction_) { position_x_ += 3; }else{ position_x_ -= 3; @@ -75,7 +75,7 @@ // Draws then moves the bullet position lcd.drawLine(position_x_, position_y_, position_x_+1, position_y_, 1); - // Moves bullet in random direction and accomodates for spaceship movement + // Moves bullet in random direction and accommodates for spaceship movement move_direction(); position_x_ += calc_sprite_movement(d_);