diff options
Diffstat (limited to 'dyl.lua')
| -rw-r--r-- | dyl.lua | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -30,7 +30,7 @@ function enemy() function EnemyBuilder:transition_state() end EnemyBuilder:b_type(Entities.Enemy) - :b_health(100) + :b_health(10) :b_position(vec2(30, 40)) :b_sprite_position(vec2(30, 40)) :b_line_of_sight(vec2(1, 0)) @@ -124,13 +124,14 @@ function bow() end function sword() + _particle_distance = 4 _attack_burst_sec = 0.200 _sword_damage = { amount = 2, knockback = { magnitude = 200, time = 0.080 } } SwordBuilder = EntityBuilder:new(World) function SwordBuilder:transition_state() if button_just_pressed(5) and self.state == States.Equipped and self.state_stopwatch > _attack_burst_sec then self:transition_to(States.Slashing) - self:equip(slashing_particle(self)) + self:equip(slashing_particle(self), _particle_distance) self.damage = _sword_damage elseif self.state == States.Slashing and self.state_stopwatch > _slashing_timer_sec then self.damage = nil |
