Initial commit

This commit is contained in:
2024-08-27 23:59:08 +02:00
commit a8031f616c
28 changed files with 1659 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
extends Node2D
var cards = []
var width: float
var cardScene
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
width = 500.0
cardScene = preload("res://Objects/Card.tscn")
draw_cards()
func draw_cards() -> void:
if (cards.size() == 0):
return
var card_width = width / cards.size()
for i in range(cards.size()):
var c = cards[i]
print(card_width)
var card = cardScene.instantiate()
card.position.x = card_width * i
self.add_child(card)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass