Sprite sheet problem

Hi everyone,

I have this weird problem and it is probably my fault but can't find a solutions so please help:

I have this code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local pan_sheet = sprite.newSpriteSheet( "pan_sheet.png", 74,70)
local pan_spriteSet1 = sprite.newSpriteSet(pan_sheet, 1, 12)
 
sprite.add( pan_spriteSet1, "walk", 1, 8, 1000, 0 ) 
sprite.add( pan_spriteSet1, "eat", 9, 12, 2000, 0 ) 
 
pan:prepare("walk")
pan:play()
 
 
local function pan_anim2()
        pan:prepare("eat")
        pan:play("eat")
end
timer.performWithDelay( 1000, pan_anim2, 1 )

Try change:

sprite.add( pan_spriteSet1, "eat", 9, 12, 2000, 0 )

to:

sprite.add( pan_spriteSet1, "eat", 9, 12, 2000, 1 )

Hi,

Cheers for the replay.

I manage to find the solution and it was again me not reading things properly.

1
2
sprite.add( pan_spriteSet1, "walk", 1, 8, 1000, 0 ) 
sprite.add( pan_spriteSet1, "eat", 9, 12, 2000, 0 ) 
views:1492 update:2011/10/2 9:44:12
corona forums © 2003-2011