harry rance
/
Revised_Space_Invaders
Harry Rance 200925395 Embedded Systems Project
Diff: Bullet.cpp
- Revision:
- 3:43970d8d642e
- Parent:
- 2:50feb42b982c
- Child:
- 6:dca8b5e2ebe5
diff -r 50feb42b982c -r 43970d8d642e Bullet.cpp --- a/Bullet.cpp Wed Apr 26 17:40:17 2017 +0000 +++ b/Bullet.cpp Sun Apr 30 15:23:56 2017 +0000 @@ -10,12 +10,14 @@ } -void Bullet::initialise(int x_origin, int y_origin, int speed, int button_check) +void Bullet::initialise(int x_origin, int y_origin, int speed, int button_check, int coins, int score) { _x = x_origin; _y = y_origin; _button_check = button_check; _speed = speed; + _coins = coins; + _score = score; } @@ -97,6 +99,31 @@ _coins += 10; } +void Bullet::dec_coins_for_life() +{ + _coins -= 100; +} + +void Bullet::dec_coins_for_x() +{ + _coins -= 50; +} + +void Bullet::dec_coins_for_y() +{ + _coins -= 100; +} + +void Bullet::dec_coins_for_b() +{ + _coins -= 150; +} + +void Bullet::dec_coins_for_r() +{ + _coins -= 200; +} + int Bullet::get_coins() { return _coins;