added add_cards(), which now sorts cards before drawing them to the hand
This commit is contained in:
@@ -11,10 +11,8 @@ signal card_clicked(playing_card: PlayingCard)
|
||||
|
||||
func _enter_tree() -> void:
|
||||
if card_details:
|
||||
print("yeses!")
|
||||
set_front_texture(CardManager.get_card_texture(card_details.card_id))
|
||||
else:
|
||||
print("NO!")
|
||||
set_front_texture(CardManager.get_card_texture(-1))
|
||||
|
||||
func move_to(new_x_position: float) -> void:
|
||||
@@ -29,6 +27,9 @@ func unselect() -> void:
|
||||
func set_front_texture(texture: Texture) -> void:
|
||||
card_mesh.get_surface_override_material(0).albedo_texture = texture
|
||||
|
||||
func setup_card_details(card_id: int) -> void:
|
||||
self.card_details = CardManager.full_deck[card_id]
|
||||
|
||||
func _get_new_tween() -> Tween:
|
||||
var tween = create_tween()
|
||||
tween.set_trans(Tween.TRANS_BACK)
|
||||
|
||||
Reference in New Issue
Block a user