Created
January 20, 2021 22:15
-
-
Save KinoAR/0ed7d8a51ac97d23994378e37ab36a1d to your computer and use it in GitHub Desktop.
Scroll Factor example Flixel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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