MultiImage Sprite Sheet


Multi Image Sprite Sheet

This sprite sheet is used if you want to cycle through a list of given images by index. You can use this component along with an Animation Controller (a.k.a Sprite Sheet Controller) to animate the frame index property on the sprite sheet renderer at a certain framerate.


Select an image asset from the list and click the plus icon to the right. The image list is a zero based index (i.e. 0, 1, 2, 3).


  • images - a Vector list of images
  • center - the center point of each image ( i.e. new Point() )

Code Sample

var entity : IEntity = PBE.allocateEntity();

//Create a sprite sheet of individual images
//This component caches and stores each frame's data to save memory
//Basic 2D version, just add G2D onto the end of the class name to render using Starling
var sheet : MultiImageSpriteSheetComponent = new MultiImageSpriteSheetComponent();
var imageList : Vector. = new Vector.();
imageList[0] = PBE.resourceManager.load("assets/imageasset_0.png") as ImageResource;
imageList[1] = PBE.resourceManager.load("assets/imageasset_1.png") as ImageResource;
sheet.images = imageList;
entity.addComponent(sheet, "MultiImageSheet");

var sheetRenderer : SpriteSheetRenderer = new SpriteSheetRenderer();
sheetRenderer.spriteSheet = sheet;

entity.addComponent(sheetRenderer, "SpriteSheetRenderer");

Follow Us For Updates