better spawn, heart ui, dash, new map
This commit is contained in:
parent
ce27965422
commit
34be761164
16 changed files with 137 additions and 171 deletions
|
|
@ -1,6 +1,6 @@
|
|||
class_name Player extends Entity
|
||||
|
||||
@export var dash_base_cd: float = 0.7
|
||||
@export var dash_base_cd: float = 0.2
|
||||
|
||||
@onready var player_sprite :AnimatedSprite2D = $PlayerSprite
|
||||
@onready var mask_sprite : Sprite2D = $PlayerSprite/MaskSprite
|
||||
|
|
@ -35,6 +35,11 @@ func _physics_process(delta: float) -> void:
|
|||
velocity += input_vector * move_speed
|
||||
|
||||
dash_cd_timer -= delta
|
||||
if dash_cd_timer > 0:
|
||||
collision_mask = (0xFFFF ^ 8) & collision_mask
|
||||
else:
|
||||
collision_mask = 8 | collision_mask
|
||||
|
||||
if Input.is_action_just_pressed("dash") and dash_cd_timer <= 0:
|
||||
start_dash(input_vector)
|
||||
|
||||
|
|
@ -69,8 +74,6 @@ func start_dash(dir: Vector2):
|
|||
tween.tween_property(player_sprite, "scale:x", 1, 0.1)
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
#if event.is_action_pressed("attack") and current_mask_data:
|
||||
#use_mask(get_global_mouse_position())
|
||||
|
||||
if event.is_action_pressed("interact") and closest_mask_drop:
|
||||
collect_drop(closest_mask_drop)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue