week 6 pause!!
This commit is contained in:
@@ -59,6 +59,7 @@ class Script extends FlxBasic implements IFlxDestroyable {
|
||||
"Strum" => funkin.game.Strum,
|
||||
"Character" => funkin.game.Character,
|
||||
"Boyfriend" => funkin.game.Character, // for compatibility
|
||||
"PauseSubstate" => funkin.menus.PauseSubState,
|
||||
"FreeplayState" => funkin.menus.FreeplayState,
|
||||
"MainMenuState" => funkin.menus.MainMenuState,
|
||||
"PauseSubState" => funkin.menus.PauseSubState,
|
||||
|
||||
@@ -20,6 +20,19 @@ class ScriptPack extends Script {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public function getByPath(name:String) {
|
||||
for(s in scripts)
|
||||
if (s.path == name)
|
||||
return s;
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getByName(name:String) {
|
||||
for(s in scripts)
|
||||
if (s.fileName == name)
|
||||
return s;
|
||||
return null;
|
||||
}
|
||||
public function importScript(path:String):Script {
|
||||
var script = Script.create(Paths.script(path));
|
||||
if (script is DummyScript) {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package funkin.scripting.events;
|
||||
|
||||
/**
|
||||
* CANCEL this event to prevent default behaviour!
|
||||
*/
|
||||
class PauseCreationEvent extends CancellableEvent {
|
||||
/**
|
||||
* Music that is going to be played
|
||||
*/
|
||||
public var music:String;
|
||||
|
||||
/**
|
||||
* All option names
|
||||
*/
|
||||
public var options:Array<String>;
|
||||
|
||||
public function new(music:String, options:Array<String>) {
|
||||
super();
|
||||
|
||||
this.music = music;
|
||||
this.options = options;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package funkin.scripting.events;
|
||||
|
||||
class PauseSelectOptionEvent extends CancellableEvent {
|
||||
/**
|
||||
* Option name thats going to be selected
|
||||
*/
|
||||
public var name:String;
|
||||
|
||||
public function new(name:String) {
|
||||
super();
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user