aboutsummaryrefslogtreecommitdiff
path: root/src/objs/player.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/objs/player.lua')
-rw-r--r--src/objs/player.lua37
1 files changed, 21 insertions, 16 deletions
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.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.spawn_shape = speck_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,