Spritesheet without Tiled or Animation
-
I can't find a simple way to load a graphic (spritesheet: multiple frames in one image) and display the frame I want, without using animation or Tiled helpers.
I looked through all the classes I could find --
FlxSprite
,FlxTile
,FlxTileMap
, etc. and also every method/property inFlxSprite
that mentionedframe
and all the frame classes (eg.FlxTileFrame
). I also checked the animation tutorial, to no avail.It doesn't seem like there's an easy way to do this. Am I missing something obvious?
Is the best approach to load the spritesheet and then blit/stamp/copy pixels into individual
FlxGraphic
instances?
-
Maybe FlxAtlas is what you're looking for?
https://api.haxeflixel.com/flixel/graphics/atlas/FlxAtlas.html
https://haxeflixel.com/demos/FlxAtlas/