Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Scroll Factor example Flixel
class PlayerHUD extends FlxTypedGroup<FlxSprite> {
public function create() {
var myGameUIText = new FlxText(0, 0, 100, 'High Score: 0', 12);
//Sets the scroll factor of the game UIText; this prevents it from scrolling in either direction.
//Note: By default buttons have a scrollFactor of 0.
myGameUIText.scrollFactor.set(0, 0);
add(myGameUIText)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment