Skip to content

Instantly share code, notes, and snippets.

@KinoAR
Created January 20, 2021 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KinoAR/0ed7d8a51ac97d23994378e37ab36a1d to your computer and use it in GitHub Desktop.
Save KinoAR/0ed7d8a51ac97d23994378e37ab36a1d to your computer and use it in GitHub Desktop.
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