Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -6,16 +6,15 @@ enum MoveState {Still, Moving, Dashing, Knockback}
|
||||
|
||||
@export var speed = 200 # How fast the player will move (pixels/sec).
|
||||
@export var dash_cooldown = 0.3
|
||||
@export var hand_size = 3
|
||||
|
||||
@onready var camera: Camera2D = %PlayerCamera
|
||||
@onready var sprite: AnimatedSprite2D = $PlayerSprite
|
||||
@onready var hand: Control = %Hand;
|
||||
|
||||
var shield_active = true;
|
||||
var move_direction = Vector2.ZERO;
|
||||
var target = Vector2.ZERO # The position of the player's cursor.
|
||||
|
||||
@export var hand: Control;
|
||||
|
||||
var screen_size # Size of the game window.
|
||||
var action_state = ActionState.None
|
||||
@@ -65,28 +64,15 @@ func charge():
|
||||
charge_level = max(charge_level - charge_rate * 2, 0);
|
||||
|
||||
func dash():
|
||||
var card = hand.get_active_card();
|
||||
if not card or dash_on_cooldown:
|
||||
if dash_on_cooldown:
|
||||
return;
|
||||
|
||||
hand.discard(self); # Must set move_state at start and end of dash
|
||||
hand.discard(); # Must set move_state at start and end of 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;
|
||||
pass
|
||||
|
||||
func _ready():
|
||||
screen_size = get_viewport_rect().size
|
||||
#while (hand.size() < hand_size and drawpile.size() > 0):
|
||||
#draw_card();
|
||||
|
||||
func _process(delta):
|
||||
update_target_coords();
|
||||
|
||||
Reference in New Issue
Block a user