This commit is contained in:
@@ -1422,14 +1422,12 @@ class PlayState extends MusicBeatState
|
||||
__pressed.clear();
|
||||
__justPressed.clear();
|
||||
__justReleased.clear();
|
||||
|
||||
// TODO: player identifier in event
|
||||
|
||||
__pressed.pushGroup(p.controls.NOTE_LEFT, p.controls.NOTE_DOWN, p.controls.NOTE_UP, p.controls.NOTE_RIGHT);
|
||||
__justPressed.pushGroup(p.controls.NOTE_LEFT_P, p.controls.NOTE_DOWN_P, p.controls.NOTE_UP_P, p.controls.NOTE_RIGHT_P);
|
||||
__justReleased.pushGroup(p.controls.NOTE_LEFT_R, p.controls.NOTE_DOWN_R, p.controls.NOTE_UP_R, p.controls.NOTE_RIGHT_R);
|
||||
|
||||
var event = scripts.event("onKeyShit", EventManager.get(InputSystemEvent).recycle(__pressed, __justPressed, __justReleased));
|
||||
var event = scripts.event("onKeyShit", EventManager.get(InputSystemEvent).recycle(__pressed, __justPressed, __justReleased, p, id));
|
||||
if (event.cancelled) return;
|
||||
|
||||
__pressed = CoolUtil.getDefault(event.pressed, []);
|
||||
|
||||
@@ -64,7 +64,6 @@ class Stage extends FlxBasic implements IBeatReceiver {
|
||||
state.add(spr);
|
||||
spr;
|
||||
case "box":
|
||||
trace('HOLY FUCK BOX DETECTED'); // TODO: someone help this aint doing shit!! >:(
|
||||
if ( !node.has.name || !node.has.width || !node.has.height) continue;
|
||||
|
||||
var spr = new FlxSprite(
|
||||
@@ -73,11 +72,9 @@ class Stage extends FlxBasic implements IBeatReceiver {
|
||||
).makeGraphic(
|
||||
Std.parseInt(node.att.width),
|
||||
Std.parseInt(node.att.height),
|
||||
(node.has.color) ? Std.parseInt(node.att.color) : 0xFFFFFFFF
|
||||
(node.has.color) ? CoolUtil.getColorFromDynamic(node.att.color) : 0xFFFFFFFF
|
||||
);
|
||||
|
||||
trace(node.att.name, node.att.width, node.att.height);
|
||||
|
||||
stageSprites.set(node.getAtt("name"), spr);
|
||||
state.add(spr);
|
||||
spr;
|
||||
|
||||
@@ -78,13 +78,15 @@ class TitleState extends MusicBeatState
|
||||
loadXML();
|
||||
#end
|
||||
|
||||
titleText = new FlxSprite(100, FlxG.height * 0.8);
|
||||
titleText.frames = Paths.getFrames('menus/titlescreen/titleEnter');
|
||||
titleText.animation.addByPrefix('idle', "Press Enter to Begin", 24);
|
||||
titleText.animation.addByPrefix('press', "ENTER PRESSED", 24);
|
||||
titleText.antialiasing = true;
|
||||
titleText.animation.play('idle');
|
||||
titleText.updateHitbox();
|
||||
if (titleText == null) {
|
||||
titleText = new FlxSprite(100, FlxG.height * 0.8);
|
||||
titleText.frames = Paths.getFrames('menus/titlescreen/titleEnter');
|
||||
titleText.animation.addByPrefix('idle', "Press Enter to Begin", 24);
|
||||
titleText.animation.addByPrefix('press', "ENTER PRESSED", 24);
|
||||
titleText.antialiasing = true;
|
||||
titleText.animation.play('idle');
|
||||
titleText.updateHitbox();
|
||||
}
|
||||
add(titleText);
|
||||
|
||||
textGroup = new FlxGroup();
|
||||
@@ -287,7 +289,8 @@ class TitleState extends MusicBeatState
|
||||
for(sprNode in node.elements) {
|
||||
var spr = XMLUtil.createSpriteFromXML(sprNode, parentFolder);
|
||||
switch(node.name) {
|
||||
// TODO: press enter to begin customisation
|
||||
case "press-enter":
|
||||
titleText = spr;
|
||||
default:
|
||||
titleScreenSprites.add(spr);
|
||||
}
|
||||
|
||||
@@ -23,4 +23,8 @@ class CreditsMain extends OptionsScreen {
|
||||
];
|
||||
super.create();
|
||||
}
|
||||
|
||||
public override function exit() {
|
||||
FlxG.switchState(new MainMenuState());
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ class MiscOptions extends OptionsScreen {
|
||||
"Reset Save Data",
|
||||
"Select this option to reset save data. This will remove all of your highscores",
|
||||
function() {
|
||||
// TODO!!
|
||||
|
||||
})
|
||||
];
|
||||
super.create();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package funkin.scripting.events;
|
||||
|
||||
import funkin.game.StrumLine;
|
||||
|
||||
class InputSystemEvent extends CancellableEvent {
|
||||
/**
|
||||
* Array containing whenever a specific control is pressed or not.
|
||||
@@ -18,4 +20,14 @@ class InputSystemEvent extends CancellableEvent {
|
||||
* For example, `justReleased[0]` will return whenever the left strum was just released.
|
||||
*/
|
||||
public var justReleased:Array<Bool>;
|
||||
|
||||
/**
|
||||
* Strumline which input is being processed.
|
||||
*/
|
||||
public var strumLine:StrumLine;
|
||||
|
||||
/**
|
||||
* ID of the Strumline.
|
||||
*/
|
||||
public var strumLineID:Int;
|
||||
}
|
||||
@@ -25,7 +25,7 @@ class CommandLineHandler {
|
||||
Sys.println("[ERROR] You need to specify the mod name");
|
||||
Sys.exit(0);
|
||||
} else {
|
||||
// TODO
|
||||
Main.modToLoad = arg.trim();
|
||||
}
|
||||
case "-modfolder":
|
||||
i++;
|
||||
|
||||
@@ -32,13 +32,14 @@ import sys.thread.Thread;
|
||||
#if sys
|
||||
import sys.io.File;
|
||||
#end
|
||||
// TODO: REMOVE TEST
|
||||
import funkin.mods.ModsFolder;
|
||||
|
||||
class Main extends Sprite
|
||||
{
|
||||
public static var instance:Main;
|
||||
|
||||
public static var modToLoad:String = null;
|
||||
|
||||
public static var scaleMode:FunkinRatioScaleMode;
|
||||
|
||||
var gameWidth:Int = 1280; // Width of the game in pixels (might be less / more in actual pixels depending on your zoom).
|
||||
@@ -212,7 +213,7 @@ class Main extends Sprite
|
||||
FlxG.signals.postStateSwitch.add(onStateSwitchPost);
|
||||
|
||||
#if MOD_SUPPORT
|
||||
ModsFolder.switchMod(Options.lastLoadedMod);
|
||||
ModsFolder.switchMod(modToLoad.getDefault(Options.lastLoadedMod));
|
||||
#end
|
||||
|
||||
initTransition();
|
||||
|
||||
Reference in New Issue
Block a user