bordello/PlayerBoard.gd

26 lines
454 B
GDScript3
Raw Normal View History

2023-06-07 01:24:11 +10:00
class_name PlayerBoard
extends Node2D
2023-06-09 01:47:36 +10:00
var workers = []
var roster = []
var shift_deck = []
var slots = []
2023-06-09 01:47:36 +10:00
func _ready():
#Workaround for bug in 4.0.3.stable
slots.append($Slot1)
slots.append($Slot2)
slots.append($Slot3)
slots.append($Slot4)
func add_to_roster(node_paths):
var cards = []
for path in node_paths:
cards.append(get_node(path))
roster.append_array(cards)
for x in 4:
if x < roster.size():
slots[x].add_worker(roster[x])