From 95df787db8f89f989fed32d7b46aaf6f47107376 Mon Sep 17 00:00:00 2001 From: Rain Clark Date: Sat, 8 Oct 2016 01:10:14 -0400 Subject: [PATCH] Fixed bug :bug: Now updates the slime' s current info when the menu opens --- source/InfoMenu.hx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/InfoMenu.hx b/source/InfoMenu.hx index a1bae9f..0776cc9 100644 --- a/source/InfoMenu.hx +++ b/source/InfoMenu.hx @@ -64,13 +64,13 @@ class InfoMenu extends FlxTypedGroup visible = true; active = true; + updateInfo(); } override public function update(elapsed:Float):Void { super.update(elapsed); - // TODO: When B is pressed fade this menu out if (FlxG.keys.pressed.Z || FlxG.gamepads.anyJustPressed(B)) closeMenu(); } @@ -80,4 +80,12 @@ class InfoMenu extends FlxTypedGroup active = 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"; + } } \ No newline at end of file