mirror of
https://github.com/Melon-Bread/Pet.GB
synced 2024-11-24 20:58:19 -05:00
X marks the spor ❌
This commit is contained in:
parent
5a406feae1
commit
c5537151f2
@ -141,7 +141,7 @@ class Gel extends FlxSprite
|
|||||||
Discipline -=5;
|
Discipline -=5;
|
||||||
Waste +=5;
|
Waste +=5;
|
||||||
}
|
}
|
||||||
}x
|
}
|
||||||
|
|
||||||
public function Praise():Void
|
public function Praise():Void
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,7 @@ import flixel.group.FlxGroup;
|
|||||||
import flixel.system.FlxSound;
|
import flixel.system.FlxSound;
|
||||||
import flixel.text.FlxText;
|
import flixel.text.FlxText;
|
||||||
import flixel.util.FlxColor;
|
import flixel.util.FlxColor;
|
||||||
|
import flixel.input.gamepad.FlxGamepad;
|
||||||
using flixel.util.FlxSpriteUtil;
|
using flixel.util.FlxSpriteUtil;
|
||||||
|
|
||||||
|
|
||||||
@ -158,15 +159,16 @@ class HUD extends FlxTypedGroup<FlxSprite>
|
|||||||
override public function update(elapsed:Float):Void
|
override public function update(elapsed:Float):Void
|
||||||
{
|
{
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
|
// TODO: Add gamepad support
|
||||||
if (FlxG.keys.justPressed.RIGHT)
|
// TODO: Add WASD support?
|
||||||
|
// TODO: Add vertical menu movent
|
||||||
|
if (FlxG.keys.justPressed.RIGHT || FlxG.gamepads.anyJustPressed(DPAD_RIGHT))
|
||||||
nextOption(true);
|
nextOption(true);
|
||||||
else if (FlxG.keys.justPressed.LEFT)
|
else if (FlxG.keys.justPressed.LEFT || FlxG.gamepads.anyJustPressed(DPAD_LEFT))
|
||||||
nextOption(false);
|
nextOption(false);
|
||||||
else if (FlxG.keys.justPressed.X)
|
else if (FlxG.keys.justPressed.X || FlxG.gamepads.anyJustPressed(B))
|
||||||
makeOption(_menuOption);
|
makeOption(_menuOption);
|
||||||
|
|
||||||
|
|
||||||
_gel.update(elapsed);
|
_gel.update(elapsed);
|
||||||
|
|
||||||
if (_gel.CurrentMood == Gel.Mood.NEUTRAL)
|
if (_gel.CurrentMood == Gel.Mood.NEUTRAL)
|
||||||
@ -189,6 +191,7 @@ class HUD extends FlxTypedGroup<FlxSprite>
|
|||||||
|
|
||||||
private function nextOption(increment:Bool):Void
|
private function nextOption(increment:Bool):Void
|
||||||
{
|
{
|
||||||
|
// TODO: Add vertical menu movent
|
||||||
if (increment)
|
if (increment)
|
||||||
{
|
{
|
||||||
if (_menuOption >= 7)
|
if (_menuOption >= 7)
|
||||||
|
@ -50,7 +50,7 @@ class MenuState extends FlxState
|
|||||||
|
|
||||||
override public function update(elapsed:Float):Void
|
override public function update(elapsed:Float):Void
|
||||||
{
|
{
|
||||||
if(FlxG.keys.pressed.ENTER)
|
if(FlxG.keys.pressed.ENTER || FlxG.gamepads.anyJustPressed(START))
|
||||||
pressStart();
|
pressStart();
|
||||||
|
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
|
Loading…
Reference in New Issue
Block a user