diff --git a/growth/player.gd b/growth/player.gd index 1dbb81d..27eec7b 100644 --- a/growth/player.gd +++ b/growth/player.gd @@ -13,7 +13,6 @@ var move_direction = Vector2.ZERO; var velocity = Vector2.ZERO # The player's movement vector. var target = Vector2.ZERO # The position of the player's cursor. - const drawpile = []; const hand = []; const discard_pile = []; @@ -67,7 +66,7 @@ func dash(): func play_card(): if active_card_index >= 0 and active_card_index < hand.size(): var card = hand[active_card_index]; - card.play(self, target); + card.play(self); func cycle_card(index_shift): if hand.size() > 0: @@ -115,12 +114,13 @@ func _process(delta): if (dash_cooldown_timer >= dash_cooldown): dash_on_cooldown = false; dash_cooldown_timer = 0; + # handle move_state if move_state == MoveState.Knockback: pass elif Input.is_action_just_pressed("dash"): dash(); - else: + elif (move_state != MoveState.Dashing): velocity = move_direction * speed; if velocity.x || velocity.y: move_state = MoveState.Moving;