modularised ball vendor
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
extends HBoxContainer
|
||||
|
||||
@export var _ball_texture: CompressedTexture2D
|
||||
@export var _ball_name: String
|
||||
@export var _ball_id: int
|
||||
|
||||
func _ready():
|
||||
$BuyButton.texture_normal = _ball_texture
|
||||
|
||||
func refresh_ball_price(new_price: int):
|
||||
$PriceLabel.text = "%s" % new_price
|
||||
|
||||
func _on_buy_button_pressed():
|
||||
SignalBus.on_try_buy_ball.emit(_ball_id)
|
||||
Reference in New Issue
Block a user