mirror of
https://github.com/Melon-Bread/Pet.GB
synced 2024-11-24 20:58:19 -05:00
Fixed bug 🐛
Now updates the slime' s current info when the menu opens
This commit is contained in:
parent
ee1fca4709
commit
95df787db8
@ -64,13 +64,13 @@ class InfoMenu extends FlxTypedGroup<FlxSprite>
|
|||||||
|
|
||||||
visible = true;
|
visible = true;
|
||||||
active = true;
|
active = true;
|
||||||
|
updateInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function update(elapsed:Float):Void
|
override public function update(elapsed:Float):Void
|
||||||
{
|
{
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
|
|
||||||
// TODO: When B is pressed fade this menu out
|
|
||||||
if (FlxG.keys.pressed.Z || FlxG.gamepads.anyJustPressed(B))
|
if (FlxG.keys.pressed.Z || FlxG.gamepads.anyJustPressed(B))
|
||||||
closeMenu();
|
closeMenu();
|
||||||
}
|
}
|
||||||
@ -80,4 +80,12 @@ class InfoMenu extends FlxTypedGroup<FlxSprite>
|
|||||||
active = false;
|
active = false;
|
||||||
visible = false;
|
visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function updateInfo():Void
|
||||||
|
{
|
||||||
|
_txtAGE.text = "Age: " + _gel.Age + " Days";
|
||||||
|
_txtINT.text = "Int: " + _gel.Intellect + " Pts";
|
||||||
|
_txtHAP.text = "HAP: " + _gel.Happiness + " Pct";
|
||||||
|
_txtDIS.text = "DIS: " + _gel.Discipline + " Pct";
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user