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:
- 31:6015e8ed859c
- Parent:
- 28:a5958497d5ce
- Child:
- 34:85ccc16f24d2
diff -r 814674b189f0 -r 6015e8ed859c Weapons/Weapons.cpp --- a/Weapons/Weapons.cpp Thu May 14 17:37:37 2020 +0000 +++ b/Weapons/Weapons.cpp Thu May 14 18:34:56 2020 +0000 @@ -20,6 +20,17 @@ bullet_delete_counter_ = 0; } +void Weapons::smart_bomb(N5110 &lcd){ + lcd.backLightOff(); + wait(0.02); + lcd.backLightOn(); + wait(0.02); + lcd.backLightOff(); + wait(0.02); + lcd.backLightOn(); +} + + void Weapons::calc_bullets_start_pos(Vector2D spaceship_pos, bool spaceship_sprite_direction_){ // Sets start position of bullet to spaceships nose @@ -83,21 +94,11 @@ } } -Vector2D Weapons::get_pos_one(){ - Vector2D pos = {position_x_,position_y_}; - return pos; -} - void Weapons::set_pos_one(Vector2D pos){ position_x_ = pos.x; position_y_ = pos.y; } -Vector2D Weapons::get_pos_two(){ - Vector2D pos = {position_x_+1,position_y_}; - return pos; -} - void Weapons::set_direction(bool sprite_direction){ direction_ = sprite_direction; }