diff options
| author | iamcheeseman <[email protected]> | 2026-03-19 19:55:33 -0400 |
|---|---|---|
| committer | iamcheeseman <[email protected]> | 2026-03-19 19:55:33 -0400 |
| commit | a1528b5860074e29dfb6814193ff7c618caa7339 (patch) | |
| tree | cdf2a2390557837add5d14f1e775663bcb2ded1b /src/objs/specks.lua | |
| parent | 49e527a25c658dedaac0c00dfaa0938d4ba4d4e3 (diff) | |
add initial velocity to specks
Diffstat (limited to 'src/objs/specks.lua')
| -rw-r--r-- | src/objs/specks.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/objs/specks.lua b/src/objs/specks.lua index 736b9aa..229eb23 100644 --- a/src/objs/specks.lua +++ b/src/objs/specks.lua @@ -30,6 +30,9 @@ function Speck_Sys.new() self.forcex = 0 self.forcey = 0 + self.initial_velx = 0 + self.initial_vely = 0 + self.lifetime_min = 1 self.lifetime_max = 5 @@ -76,7 +79,7 @@ function Speck_Sys:update(dt) data.alive[id] = true data.pos[id] = { x = self.x, y = self.y } - data.vel[id] = { x = 0, y = 0 } + data.vel[id] = { x = self.initial_velx, y = self.initial_vely } data.lifetime[id] = randf_range( self.lifetime_min, self.lifetime_max) |
