From 34535e47d69c3dabf0c3ec4c6434ae9bc99c618d Mon Sep 17 00:00:00 2001 From: ne_mene Date: Wed, 25 Mar 2026 14:00:47 +0100 Subject: speck system export/load --- src/objs/player.lua | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) (limited to 'src/objs/player.lua') diff --git a/src/objs/player.lua b/src/objs/player.lua index 0ce14e2..4a51eae 100644 --- a/src/objs/player.lua +++ b/src/objs/player.lua @@ -89,6 +89,9 @@ function player_update_sys(player, dt) if player.box:touching_down() then player.grounded_timer = COYOTE end + if love.keyboard.isDown("k") then + export_speck_sys(player.speck_sys, "test.speck.lua") + end end function new_player(x, y) @@ -96,23 +99,25 @@ function new_player(x, y) add_comp(ent, "Player") add_comp(ent, "Speck_System") - ent.speck_sys.interval = 0.05 - - ent.speck_sys.spawn_amount_max = 10 - - ent.speck_sys.lifetime_max = 0.6 - ent.speck_sys.lifetime_min = 0.3 - - ent.speck_sys.initial_velx = 100 - ent.speck_sys.initial_vely = 0 - ent.speck_sys.spread = 360 - - ent.speck_sys.forcey = 1000 - ent.speck_sys.bounce = true - - ent.speck_sys.spawn_shape = speck_shape_rectangle - ent.speck_sys.spawn_width = 100 - ent.speck_sys.spawn_height = 100 + -- ent.speck_sys.interval = 0.05 + -- + -- ent.speck_sys.spawn_amount_max = 10 + -- + -- ent.speck_sys.lifetime_max = 0.6 + -- ent.speck_sys.lifetime_min = 0.3 + -- + -- ent.speck_sys.initial_velx = 100 + -- ent.speck_sys.initial_vely = 0 + -- ent.speck_sys.spread = 360 + -- + -- ent.speck_sys.forcey = 1000 + -- ent.speck_sys.bounce = true + -- + -- ent.speck_sys.spawn_shape = "Rectangle" + -- ent.speck_sys.spawn_width = 100 + -- ent.speck_sys.spawn_height = 100 + + ent.speck_sys = load_speck_sys("test.speck.lua") add_comp(ent, "Body", x, y, 8, 14, { offsetx = -4, -- cgit v1.3-2-g0d8e