diff options
author | chai <chaifix@163.com> | 2018-12-07 11:46:49 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-12-07 11:46:49 +0800 |
commit | ec6920656d8225538baaac677b62aa564fc1055e (patch) | |
tree | 1ee41f8aaad1bc5d324df8b6e4af0fd9ee2e281c /bin/game/main.lua | |
parent | 150944ee9e41df2ae5ee25c7845c3f5b2bd74af0 (diff) |
*particle system demo
Diffstat (limited to 'bin/game/main.lua')
-rw-r--r-- | bin/game/main.lua | 3 |
1 files changed, 1 insertions, 2 deletions
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() |