페이지

2021년 11월 15일 월요일

How to set TextureSheetAnimationModule.startFrame constant value by script

if 8x8 texture atlas sheet,

Set Texture Sprite of column index = 3, row index = 1.

 

var ps = flame.textureSheetAnimation;
ps.numTilesX = 8;
ps.numTilesY = 8;
ps.animation = ParticleSystemAnimationType.SingleRow;
ps.startFrame = 1f / flameTextureSheets.numTilesX * 3f;
ps.rowIndex = 1;