initial commit
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
extends Node3D
|
||||
|
||||
var handCards = [];
|
||||
@export var HandParent: Node3D;
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
func make_card_model(card: GameState.Card):
|
||||
var viewport = load("res://card_render.tscn").instantiate();
|
||||
viewport.set_card(card);
|
||||
viewport.position = Vector3(-3.5 + handCards.size()*1.8, 0,0)
|
||||
HandParent.add_child(viewport)
|
||||
handCards.append(viewport);
|
||||
|
||||
|
||||
func _on_game_state_card_drawn(card: RefCounted) -> void:
|
||||
make_card_model(card)
|
||||
Reference in New Issue
Block a user