Friday, April 27, 2012

Sprite Sheet 데이터를 로드하기 - 두가지 방법

1. Uniformly-sized frames
The following code creates a new sprite sheet from image containing uniformly-sized frames, but does not add anything to the display list.
 spriteSheet = sprite.newSpriteSheet("image.png", frameWidth, frameHeight)  

2. Zwoptex로 뽑은 frames
This second form takes as its second parameter a table that describes the frame sizes and positions in the source sprite sheet image.
 spriteSheet = sprite.newSpriteSheetFromData( "image.png", spriteData )  
관련링크 : Corona로 Sprite Sheet Animation 만들기

No comments:

Post a Comment