From c8444758afa213ed89c9cf6d4793bd7812b0b734 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sun, 26 Apr 2026 16:12:38 -0700 Subject: Checkpoint --- dyl.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dyl.lua') diff --git a/dyl.lua b/dyl.lua index 6a337cd..e379ae3 100644 --- a/dyl.lua +++ b/dyl.lua @@ -7,7 +7,7 @@ function spawn_slashing_particle(e) -- transitions slash_animation:equipped_from(e, _slash_animation_distance) end - return slash_animation:b_type(Entities.Enemy) + return slash_animation:b_type(Entities.Particle) :b_line_of_sight(e.line_of_sight) :b_position(vec2(e.position)) :b_sprite_position(vec2(position)) @@ -99,8 +99,9 @@ bow:b_type(Entities.Bow) :build() sword = entity() +_attack_burst_sec = 0.200 function sword:transition_state() - if button_just_pressed(5) and self.state == States.Equipped then + if button_just_pressed(5) and self.state == States.Equipped and self.state_stopwatch > _attack_burst_sec then self:transition_to(States.Slashing) spawn_slashing_particle(self) elseif self.state == States.Slashing and self.state_stopwatch > _slashing_timer_sec then -- cgit v1.3