script callback names now makes sense!

This commit is contained in:
Yoshman29
2022-11-17 23:21:57 +01:00
parent 341a088f5f
commit e782ebe91b
5 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ function destroy() {
var canDoShit = true;
var time:Float = 0;
function update(elapsed) {
pixelScript.call("updatePost", [elapsed]);
pixelScript.call("postUpdate", [elapsed]);
pauseCam.alpha = lerp(pauseCam.alpha, 1, 0.25);
time += elapsed;
@@ -82,7 +82,7 @@ function destroy() {
var canDoShit = true;
var time:Float = 0;
function update(elapsed) {
pixelScript.call("updatePost", [elapsed]);
pixelScript.call("postUpdate", [elapsed]);
pauseCam.alpha = lerp(pauseCam.alpha, 1, 0.25);
time += elapsed;
+4 -4
View File
@@ -508,7 +508,7 @@ class PlayState extends MusicBeatState
event.spriteTween = tween;
event.cancelled = false;
scripts.event("onCountdownPost", event);
scripts.event("onPostCountdown", event);
}
public var previousFrameTime:Int = 0;
@@ -1132,7 +1132,7 @@ class PlayState extends MusicBeatState
if (event.__reposNote) event.strum.updateNotePosition(daNote);
event.strum.updateSustain(daNote);
PlayState.instance.scripts.event("onNoteUpdatePost", event);
PlayState.instance.scripts.event("onNotePostUpdate", event);
}
});
@@ -1146,7 +1146,7 @@ class PlayState extends MusicBeatState
endSong();
#end
scripts.call("updatePost", [elapsed]);
scripts.call("postUpdate", [elapsed]);
}
function endSong():Void
@@ -1278,7 +1278,7 @@ class PlayState extends MusicBeatState
playerStrums.forEach(function(str:Strum) {
str.updatePlayerInput(pressed[str.ID], justPressed[str.ID], justReleased[str.ID]);
});
scripts.call("onKeyShitPost");
scripts.call("onPostKeyShit");
}
function noteMiss(note:Note):Void
@@ -32,15 +32,15 @@ class CountdownEvent extends CancellableEvent {
/**
* Created sprite, only available in `onCountdownPost`
* Created sprite, only available in `onPostCountdown`
*/
public var sprite:FlxSprite;
/**
* Created tween for the sprite, only available in `onCountdownPost`
* Created tween for the sprite, only available in `onPostCountdown`
*/
public var spriteTween:FlxTween;
/**
* Created sound, only available in `onCountdownPost`
* Created sound, only available in `onPostCountdown`
*/
public var sound:FlxSound;
+1 -1
View File
@@ -56,7 +56,7 @@ interface PlayStateScript {
* Triggered after every countdown.
* @param event Countdown event.
*/
public function onCountdownPost(event:CountdownEvent):Void;
public function onPostCountdown(event:CountdownEvent):Void;
/**
* Triggered whenever the player hits a note.