diff options
Diffstat (limited to 'dyl.lua')
| -rw-r--r-- | dyl.lua | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1,3 +1,5 @@ +DEBUG = true + _slashing_timer_sec = .12 _slash_animation_distance = 3 function slashing_particle(following) @@ -53,6 +55,7 @@ function fire() end function enemy() + _enemy_damage_spec = { amount = 2, knockback = { magnitude = 200, time = 0.120 } } EnemyBuilder = EntityBuilder:new(World) function EnemyBuilder:transition_state() end @@ -61,6 +64,7 @@ function enemy() :b_position(vec2(30, -40)) :b_sprite_position(vec2(30, 40)) :b_line_of_sight(vec2(1, 0)) + :b_damage(_enemy_damage_spec) :b_render_order(1) :b_collidable() :b_add_state( @@ -263,7 +267,9 @@ function player() :b_render_order(2) :b_collidable() :b_position(vec2(30, 30)) + :b_health(10) :b_sprite_position(vec2(30, 30)) + :b_collision_bounds(vec2(2, 2), vec2(5, 6)) :b_add_state( States.Idle, { animation = { |
