Initial commit (1/2)
This commit is contained in:
commit
3411c5796d
66 changed files with 2261 additions and 0 deletions
12
scenes/menus/BuyMenuHealth.gd
Normal file
12
scenes/menus/BuyMenuHealth.gd
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
extends BuyMenuButton
|
||||
|
||||
func bought_action():
|
||||
if PlayerShip.Hull.HP >= PlayerShip.Hull.MaxHP:
|
||||
PlayerShip.Hull.HP = PlayerShip.Hull.MaxHP
|
||||
PlayerShip.Money += Price
|
||||
return
|
||||
PlayerShip.Hull.HP += 1
|
||||
while(PlayerShip.Hull.HP < PlayerShip.Hull.MaxHP and PlayerShip.Money >= Price):
|
||||
PlayerShip.Hull.HP += 1
|
||||
PlayerShip.Money -= Price
|
||||
if PlayerShip.Hull.HP > PlayerShip.Hull.MaxHP: PlayerShip.Hull.HP = PlayerShip.Hull.MaxHP
|
||||
Loading…
Add table
Add a link
Reference in a new issue