Repository navigation
|
Theres this last parameter when making and loading graphic, a key string. I was wondering how do I use that feature to get a specific FlxSprite or FlxGraphic. |
Answered by
Geokureli
Nov 3, 2025
Replies: 1 comment
|
It's not meant to retrieve specific FlxSprites, but it can be used to retrieve graphic made using this key. For instance: var graphic:Null<FlxGraphic> = FlxG.bitmap.get(someKey);
if (graphic == null)
{
graphic = FlxG.bitmap.create(100, 100, 0x0, false, someKey);
// draw the graphic
}
final sprite = new FlxSprite(0, 0, graphic); |
0 replies
Answer selected by
KELOTOMU
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not meant to retrieve specific FlxSprites, but it can be used to retrieve graphic made using this key. For instance: