From ec6920656d8225538baaac677b62aa564fc1055e Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 7 Dec 2018 11:46:49 +0800 Subject: *particle system demo --- bin/game/main.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bin/game/main.lua') diff --git a/bin/game/main.lua b/bin/game/main.lua index 6851c45..8de71f1 100644 --- a/bin/game/main.lua +++ b/bin/game/main.lua @@ -62,12 +62,11 @@ local function createAnimation(path, count, r, c, w, h, loop, speed) return jin.graphics.newAnimation(sprs, loop, speed) end local Pi = 3.1415 -local tex = nil function jin.core.onLoad() -- bitmap = jin.graphics.newBitmap(200, 200, function(w, h, x, y) -- return {255*math.sin(x/w),255 - 255,255*math.cos(y/w),255} -- end) - tex = jin.graphics.newTexture("particle.png") + local tex = jin.graphics.newTexture("particle.png") particle_sprite = jin.graphics.newSprite(tex, jin.graphics.SpriteOrigin.MIDDLECENTER) ps = jin.graphics.newParticleSystem() -- cgit v1.1-26-g67d0