added price economy

This commit is contained in:
2024-11-13 17:23:04 +01:00
parent a12a965a2b
commit 0e850fd373
9 changed files with 283 additions and 18 deletions
+11 -8
View File
@@ -13,11 +13,14 @@ func _physics_process(delta):
func _on_try_buy_ball(id: int):
var new_ball
match id:
1:
new_ball = ball_basic_scene.instantiate()
2:
new_ball = ball_speed_scene.instantiate()
new_ball.global_position = $GameContent/BallSpawn.global_position
$GameContent/Balls.add_child(new_ball)
if $BallVendor.may_buy_ball(id):
match id:
1:
new_ball = ball_basic_scene.instantiate()
2:
new_ball = ball_speed_scene.instantiate()
new_ball.global_position = $GameContent/BallSpawn.global_position
$GameContent/Balls.add_child(new_ball)
else:
pass # TODO