added price economy
This commit is contained in:
+11
-8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user