feat: them skeletons man + reload after dancing
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 5s
Create tag and build when new code gets to main / Export (push) Successful in 2m12s

This commit is contained in:
2025-08-02 23:57:02 +02:00
parent eda35b4e9b
commit 3e0f1c99d5
9 changed files with 851 additions and 9 deletions

View File

@ -11,6 +11,9 @@ var jump_velocity = 400.0
@export_range(0, 10, 0.1, "or_greater")
var gravity_modifier = 1
@onready var hitting: Timer = $Hitting
@onready var hitbox: Area2D = $Hitbox
@onready var sword: AnimatedSprite2D = $Sword
@onready var damageable: Damageable = $Damageable
@onready var shield: AnimatedSprite2D = $Shield
@ -20,6 +23,7 @@ var current_sprite: AnimatedSprite2D
var is_in_cutscene = false # back to true on build
var current_animation = "idle"
var is_hitting = false
var has_shield = false
var has_sword = false
var has_armor = false
@ -62,6 +66,12 @@ func _physics_process(delta: float) -> void:
move_and_slide()
return
if is_hitting:
current_animation = "hit"
velocity.x = move_toward(velocity.x, 0, speed)
move_and_slide()
return
if not is_on_floor():
velocity += get_gravity() * delta * gravity_modifier
@ -95,8 +105,15 @@ func _physics_process(delta: float) -> void:
move_and_slide()
func hit():
print("hit")
current_animation = "hit"
is_hitting = true
hitting.start()
hitbox.monitorable = true
hitbox.monitoring = true
func _on_hitting_timeout() -> void:
is_hitting = false
hitbox.monitorable = false
hitbox.monitoring = false
func _on_dialogue_manager_dialogue_ended() -> void:
set_in_play()