diff options
author | chai <chaifix@163.com> | 2018-11-22 08:42:31 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-22 08:42:31 +0800 |
commit | 1b25709b10cf92007096949f002b4941517eb749 (patch) | |
tree | 1f7a99938e17104d332e2547b99be95f853e2914 /bin/game/main.lua | |
parent | 07022c42a925d4d0c23ab31f0e75883766ce773a (diff) |
*注册lua对象
Diffstat (limited to 'bin/game/main.lua')
-rw-r--r-- | bin/game/main.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/game/main.lua b/bin/game/main.lua index b8aa2cd..d268e23 100644 --- a/bin/game/main.lua +++ b/bin/game/main.lua @@ -59,7 +59,7 @@ local function createAnimation(path, count, r, c, w, h, loop, speed) local sprs = ssheet:newSprites(count, r, c, w, h, jin.graphics.SpriteOrigin.BOTTOMCENTER) return jin.graphics.newAnimation(sprs, loop, speed) end - +asd 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} @@ -70,8 +70,7 @@ function jin.core.onLoad() tex = jin.graphics.newTexture(bitmap) local tex2 = jin.graphics.newTexture("anim.png") local ssheet2 = jin.graphics.newSpriteSheet(tex2) - sprs = ssheet2:newSprites(1, 19, 246, 238, jin.graphics.SpriteOrigin.BOTTOMCENTER) - local animation = createAnimation("anim2.png", 27, 3, 10, 200, 200, true, 20) + local animation = createAnimation("anim2.png", 27, 3, 10, 200, 200, true, 100) animator = jin.graphics.newAnimator(animation) animation = nil local ssheet = jin.graphics.newSpriteSheet(tex) |