aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/objs/specks.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/objs/specks.lua b/src/objs/specks.lua
index 1d133e7..9424680 100644
--- a/src/objs/specks.lua
+++ b/src/objs/specks.lua
@@ -44,6 +44,7 @@ function Speck_Sys.new()
self.free_ids_size = 0
self.bounce = false
+ self.gradient = "res/img/test_gradient.png"
self.spawn_shape = "Point"
@@ -196,9 +197,14 @@ function Speck_Sys:draw()
local w, h = tex:getDimensions()
+ local gradient = get_tex_data(self.gradient)
+ local sample_pos = math.floor((gradient:getWidth() - 1) * anim)
+ lg.setColor(gradient:getPixel(sample_pos, 0.5))
+
lg.draw(
tex, data.pos[i].x, data.pos[i].y, 0, scale, scale, w / 2, h / 2
)
+ lg.setColor(1, 1, 1, 1)
::next_speck_draw::
end
end
@@ -240,6 +246,7 @@ function export_speck_sys(sys, filename)
"lifetime_max",
"interval",
"texture_path",
+ "gradient",
"bounce",
}
local exp = {}