createPost -> postCreate

This commit is contained in:
YoshiCrafter29
2022-11-15 09:51:14 +01:00
parent e29392dc8a
commit 14fc936562
11 changed files with 14 additions and 15 deletions
+1 -1
View File
@@ -1 +1 @@
1291
1293
+1 -1
View File
@@ -30,7 +30,7 @@ class ScriptedCutscene extends Cutscene {
public override function update(elapsed:Float) {
script.call("update", [elapsed]);
super.update(elapsed);
script.call("updatePost", [elapsed]);
script.call("postUpdate", [elapsed]);
}
public override function beatHit(curBeat:Int) {
+1 -1
View File
@@ -293,7 +293,7 @@ class Character extends FlxSprite implements IBeatReceiver implements IOffsetCom
if (isPlayer) flipX = !flipX;
__baseFlipped = flipX;
dance();
script.call("createPost");
script.call("postCreate");
}
var __baseFlipped:Bool = false;
+2 -2
View File
@@ -386,7 +386,7 @@ class PlayState extends MusicBeatState
public override function createPost() {
startCutscene();
super.createPost();
scripts.call("createPost");
scripts.call("postCreate");
}
public function startCutscene() {
@@ -1095,7 +1095,7 @@ class PlayState extends MusicBeatState
for(e in (daNote.mustPress ? playerStrums : cpuStrums).members) {
if (e.ID == daNote.noteData % 4) {
strum = e;
break;
break; //ing bad
}
}
+2 -2
View File
@@ -40,6 +40,8 @@ class MainMenuState extends MusicBeatState
override function create()
{
super.create();
#if desktop
// Updating Discord Rich Presence
DiscordClient.changePresence("In the Menus", null);
@@ -103,8 +105,6 @@ class MainMenuState extends MusicBeatState
// NG.core.calls.event.logEvent('swag').send();
changeItem();
super.create();
}
var selectedSomethin:Bool = false;
+1 -1
View File
@@ -97,7 +97,7 @@ class PauseSubState extends MusicBeatSubstate
cameras = [FlxG.cameras.list[FlxG.cameras.list.length - 1]];
pauseScript.call("createPost");
pauseScript.call("postCreate");
}
override function update(elapsed:Float)
-1
View File
@@ -42,7 +42,6 @@ class GlobalScript {
});
FlxG.signals.postUpdate.add(function() {
call("postUpdate", [FlxG.elapsed]);
call("updatePost", [FlxG.elapsed]);
if (FlxG.keys.justPressed.F5) {
if (script != null && !(script is DummyScript)) {
Logs.trace('Reloading global script...', WARNING, YELLOW);
+1 -1
View File
@@ -119,7 +119,7 @@ class MusicBeatState extends FlxUIState implements IBeatReceiver
public override function createPost() {
super.createPost();
call("createPost");
call("postCreate");
}
public function call(name:String, ?args:Array<Dynamic>, ?defaultVal:Dynamic):Dynamic {
// calls the function on the assigned script
+1 -1
View File
@@ -16,7 +16,7 @@ interface CharacterScript {
/**
* Triggered after the character has been entirely loaded.
*/
public function createPost():Void;
public function postCreate():Void;
/**
* Triggered every frame.
+1 -1
View File
@@ -51,7 +51,7 @@ interface GlobalScript {
*
* @param elapsed Time elapsed since last frame
*/
public function updatePost(elapsed:Float):Void;
public function postUpdate(elapsed:Float):Void;
/**
* Called before the game draws on screen.
+3 -3
View File
@@ -20,7 +20,7 @@ interface PlayStateScript {
/**
* Triggered at the very end of PlayState's creation
*/
public function createPost():Void;
public function postCreate():Void;
/**
* Triggered every frame.
@@ -32,7 +32,7 @@ interface PlayStateScript {
* Triggered at the end of every frame.
* @param elapsed Time elapsed since last frame.
*/
public function updatePost(elapsed:Float):Void;
public function postUpdate(elapsed:Float):Void;
/**
* Triggered every step
@@ -80,7 +80,7 @@ interface PlayStateScript {
* Triggered after the input system updates.
* @param note Event object with the pressed, justPressed and justReleased notes.
*/
public function inputUpdatePost(event:InputSystemEvent):Void;
public function inputPostUpdate(event:InputSystemEvent):Void;
/**
* Triggered on each note creation