cosmic/scenes/menus/BuyMenuTurbo.gd
Алкесей Мирнеков 3411c5796d
Initial commit (1/2)
2023-11-05 16:23:18 +03:00

9 lines
329 B
GDScript

extends BuyMenuButton
@export var TurboAmount : float = 1000
func bought_action():
if PlayerShip.Hull.Fuel == PlayerShip.Hull.MaxFuel: PlayerShip.Money += Price
else:
if PlayerShip.Hull.Fuel + TurboAmount > PlayerShip.Hull.MaxFuel: PlayerShip.Hull.Fuel = PlayerShip.Hull.MaxFuel
else: PlayerShip.Hull.Fuel += TurboAmount