sorry I broke I shit again lol
This commit is contained in:
@@ -15,7 +15,7 @@ var shield_active = true;
|
||||
var move_direction = Vector2.ZERO;
|
||||
var target = Vector2.ZERO # The position of the player's cursor.
|
||||
|
||||
@export var hand;
|
||||
@export var hand: Control;
|
||||
|
||||
var screen_size # Size of the game window.
|
||||
var action_state = ActionState.None
|
||||
@@ -73,18 +73,19 @@ func dash():
|
||||
dash_on_cooldown = true;
|
||||
|
||||
func draw_card():
|
||||
if drawpile.size() == 0:
|
||||
shuffle_deck();
|
||||
if drawpile.size() > 0 and hand.size() < hand_size:
|
||||
var card = drawpile.pop_back();
|
||||
hand.append(card);
|
||||
if active_card_index == -1:
|
||||
active_card_index = 0;
|
||||
#if drawpile.size() == 0:
|
||||
#shuffle_deck();
|
||||
#if drawpile.size() > 0 and hand.size() < hand_size:
|
||||
#var card = drawpile.pop_back();
|
||||
#hand.append(card);
|
||||
#if active_card_index == -1:
|
||||
#active_card_index = 0;
|
||||
pass
|
||||
|
||||
func _ready():
|
||||
screen_size = get_viewport_rect().size
|
||||
while (hand.size() < hand_size and drawpile.size() > 0):
|
||||
draw_card();
|
||||
#while (hand.size() < hand_size and drawpile.size() > 0):
|
||||
#draw_card();
|
||||
|
||||
func _process(delta):
|
||||
update_target_coords();
|
||||
|
||||
Reference in New Issue
Block a user