score on song
This commit is contained in:
@ -83,6 +83,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
var talking:Bool = true;
|
||||
var songScore:Int = 0;
|
||||
var scoreTxt:FlxText;
|
||||
|
||||
public static var campaignScore:Int = 0;
|
||||
|
||||
@ -252,6 +253,11 @@ class PlayState extends MusicBeatState
|
||||
// healthBar
|
||||
add(healthBar);
|
||||
|
||||
scoreTxt = new FlxText(healthBarBG.x + healthBarBG.width - 190, healthBarBG.y + 30, 0, "", 20);
|
||||
scoreTxt.setFormat("assets/fonts/vcr.ttf", 16, FlxColor.WHITE, RIGHT);
|
||||
scoreTxt.scrollFactor.set();
|
||||
add(scoreTxt);
|
||||
|
||||
healthHeads = new FlxSprite();
|
||||
var headTex = FlxAtlasFrames.fromSparrow(AssetPaths.healthHeads__png, AssetPaths.healthHeads__xml);
|
||||
healthHeads.frames = headTex;
|
||||
@ -277,6 +283,7 @@ class PlayState extends MusicBeatState
|
||||
healthBar.cameras = [camHUD];
|
||||
healthBarBG.cameras = [camHUD];
|
||||
healthHeads.cameras = [camHUD];
|
||||
scoreTxt.cameras = [camHUD];
|
||||
doof.cameras = [camHUD];
|
||||
|
||||
// if (SONG.song == 'South')
|
||||
@ -586,6 +593,8 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
super.update(elapsed);
|
||||
|
||||
scoreTxt.text = "Score:" + songScore;
|
||||
|
||||
if (FlxG.keys.justPressed.ENTER && startedCountdown)
|
||||
{
|
||||
persistentUpdate = false;
|
||||
|
Reference in New Issue
Block a user