added debugs and cheats and we usin fmod
This commit is contained in:
@ -30,6 +30,7 @@ enum abstract Action(String) to String from String
|
||||
var BACK = "back";
|
||||
var PAUSE = "pause";
|
||||
var RESET = "reset";
|
||||
var CHEAT = "cheat";
|
||||
}
|
||||
#else
|
||||
@:enum
|
||||
@ -51,6 +52,7 @@ abstract Action(String) to String from String
|
||||
var BACK = "back";
|
||||
var PAUSE = "pause";
|
||||
var RESET = "reset";
|
||||
var CHEAT = "cheat";
|
||||
}
|
||||
#end
|
||||
|
||||
@ -75,6 +77,7 @@ enum Control
|
||||
ACCEPT;
|
||||
BACK;
|
||||
PAUSE;
|
||||
CHEAT;
|
||||
}
|
||||
|
||||
enum KeyboardScheme
|
||||
@ -107,6 +110,7 @@ class Controls extends FlxActionSet
|
||||
var _back = new FlxActionDigital(Action.BACK);
|
||||
var _pause = new FlxActionDigital(Action.PAUSE);
|
||||
var _reset = new FlxActionDigital(Action.RESET);
|
||||
var _cheat = new FlxActionDigital(Action.CHEAT);
|
||||
|
||||
#if (haxe >= "4.0.0")
|
||||
var byName:Map<String, FlxActionDigital> = [];
|
||||
@ -197,6 +201,11 @@ class Controls extends FlxActionSet
|
||||
inline function get_RESET()
|
||||
return _reset.check();
|
||||
|
||||
public var CHEAT(get, never):Bool;
|
||||
|
||||
inline function get_CHEAT()
|
||||
return _cheat.check();
|
||||
|
||||
#if (haxe >= "4.0.0")
|
||||
public function new(name, scheme = None)
|
||||
{
|
||||
@ -218,6 +227,7 @@ class Controls extends FlxActionSet
|
||||
add(_back);
|
||||
add(_pause);
|
||||
add(_reset);
|
||||
add(_cheat);
|
||||
|
||||
for (action in digitalActions)
|
||||
byName[action.name] = action;
|
||||
@ -245,6 +255,7 @@ class Controls extends FlxActionSet
|
||||
add(_back);
|
||||
add(_pause);
|
||||
add(_reset);
|
||||
add(_cheat);
|
||||
|
||||
for (action in digitalActions)
|
||||
byName[action.name] = action;
|
||||
@ -298,6 +309,7 @@ class Controls extends FlxActionSet
|
||||
case BACK: _back;
|
||||
case PAUSE: _pause;
|
||||
case RESET: _reset;
|
||||
case CHEAT: _cheat;
|
||||
}
|
||||
}
|
||||
|
||||
@ -341,6 +353,8 @@ class Controls extends FlxActionSet
|
||||
func(_pause, JUST_PRESSED);
|
||||
case RESET:
|
||||
func(_reset, JUST_PRESSED);
|
||||
case CHEAT:
|
||||
func(_cheat, JUST_PRESSED);
|
||||
}
|
||||
}
|
||||
|
||||
@ -628,7 +642,9 @@ class Controls extends FlxActionSet
|
||||
Control.LEFT => [DPAD_LEFT, LEFT_STICK_DIGITAL_LEFT],
|
||||
Control.RIGHT => [DPAD_RIGHT, LEFT_STICK_DIGITAL_RIGHT],
|
||||
Control.PAUSE => [START],
|
||||
Control.RESET => [Y]
|
||||
//Swap Y and X for switch
|
||||
Control.RESET => [Y],
|
||||
Control.CHEAT => [X]
|
||||
]);
|
||||
#end
|
||||
}
|
||||
|
@ -583,9 +583,13 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
super.update(elapsed);
|
||||
|
||||
trace("FlxG.elapsed: " + FlxG.elapsed);
|
||||
#if lime
|
||||
trace("IT'S LIME");
|
||||
#end
|
||||
|
||||
//trace("FlxG.elapsed: " + FlxG.elapsed);
|
||||
trace("FlxG.sound.music.time: " + FlxG.sound.music.time);
|
||||
trace("FlxG.sound.music.playing: " + FlxG.sound.music.playing);
|
||||
//trace("FlxG.sound.music.playing: " + FlxG.sound.music.playing);
|
||||
//trace("SONG POS: " + Conductor.songPosition);
|
||||
// FlxG.sound.music.pitch = 2;
|
||||
|
||||
@ -727,6 +731,18 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
// better streaming of shit
|
||||
|
||||
//RESET = Quick Game Over Screen
|
||||
if (controls.RESET){
|
||||
health = 0;
|
||||
trace("RESET = True");
|
||||
}
|
||||
|
||||
//CHEAT = brandon's a pussy
|
||||
if (controls.CHEAT){
|
||||
health += 1;
|
||||
trace("User is cheating!");
|
||||
}
|
||||
|
||||
if (health <= 0)
|
||||
{
|
||||
boyfriend.stunned = true;
|
||||
@ -1288,9 +1304,9 @@ class PlayState extends MusicBeatState
|
||||
if (vocals.time > Conductor.songPosition + Conductor.stepCrochet
|
||||
|| vocals.time < Conductor.songPosition - Conductor.stepCrochet)
|
||||
{
|
||||
vocals.pause();
|
||||
//vocals.pause();
|
||||
vocals.time = Conductor.songPosition;
|
||||
vocals.play();
|
||||
//vocals.play();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,10 @@ class TitleState extends MusicBeatState
|
||||
|
||||
function startIntro()
|
||||
{
|
||||
#if switch
|
||||
initialized = true;
|
||||
#end
|
||||
|
||||
if (!initialized)
|
||||
{
|
||||
var diamond:FlxGraphic = FlxGraphic.fromClass(GraphicTransTileDiamond);
|
||||
|
Reference in New Issue
Block a user