gitignore

This commit is contained in:
Yoshman29
2022-11-08 21:58:49 +01:00
parent 9c021f319e
commit c7ec08c185
6 changed files with 50 additions and 95 deletions
+1 -3
View File
@@ -244,8 +244,6 @@ class PlayState extends MusicBeatState
// Checks if cutscene files exists
var cutscenePath = Paths.script('data/cutscenes/${SONG.song.toLowerCase()}');
var endCutscenePath = Paths.script('data/cutscenes/${SONG.song.toLowerCase()}-end');
trace(cutscenePath);
trace(endCutscenePath);
if (Assets.exists(cutscenePath))
cutscene = cutscenePath;
if (Assets.exists(endCutscenePath))
@@ -629,7 +627,7 @@ class PlayState extends MusicBeatState
for(k=>e in noteTypesArray)
if (e == name) return k;
noteTypesArray.push(name);
// loads script
+34
View File
@@ -0,0 +1,34 @@
package funkin.scripting;
class ScriptedState extends MusicBeatState {
var script:Script;
public override function new(scriptName:String) {
super();
script = Script.create(Paths.script('data/states/${scriptName}'));
script.setParent(this);
script.load();
}
public override function create() {
super.create();
script.call("create");
}
public override function update(elapsed:Float) {
script.call("preUpdate", [elapsed]);
super.update(elapsed);
script.call("update", [elapsed]);
}
public override function beatHit(curBeat:Int) {
super.beatHit(curBeat);
script.call("beatHit", [curBeat]);
}
public override function stepHit(curStep:Int) {
super.stepHit(curStep);
script.call("stepHit", [curStep]);
}
}