Skip to content

Commit

Permalink
remove deprecated functions from codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortex2Oblivion committed Nov 16, 2024
1 parent 8eaf99a commit 88f42ca
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 125 deletions.
4 changes: 2 additions & 2 deletions source/game/SpraycanAtlasSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class SpraycanAtlasSprite extends FlxAtlasSprite {
explodeEZ.animation.play("idle");

PlayState.instance.stage.add(explodeEZ);
explodeEZ.animation.finishCallback = (name:String) -> {
explodeEZ.animation.onFinish.add((name:String) -> {
explodeEZ.kill();
};
});
}

public function playCanStart():Void {
Expand Down
103 changes: 0 additions & 103 deletions source/game/SustainSplash.hx

This file was deleted.

2 changes: 1 addition & 1 deletion source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2272,7 +2272,7 @@ class PlayState extends MusicBeatState {
splash_group.add(splash);
}

spr.animation.finishCallback = function(_) spr.playAnim("static");
spr.animation.onFinish.add((animName:String) -> spr.playAnim("static"));
}
});
}
Expand Down
16 changes: 8 additions & 8 deletions source/substates/ResultsSubstate.hx
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ class ResultsSubstate extends MusicBeatSubstate {
gfGood.visible = false;
// gfGood.zIndex = 500;
gfGood.antialiasing = Options.getData("antialiasing");
gfGood.animation.finishCallback = _ -> {
gfGood.animation.onFinish.add((animName:String) -> {
if (gfGood != null) {
gfGood.animation.play('clap', true, false, 9);
}
};
});
add(gfGood);

bfGood = new FlxSprite(640, -200);
Expand All @@ -275,11 +275,11 @@ class ResultsSubstate extends MusicBeatSubstate {
bfGood.visible = false;
// bfGood.zIndex = 501;
bfGood.antialiasing = Options.getData("antialiasing");
bfGood.animation.finishCallback = function(_) {
bfGood.animation.onFinish.add(function(_) {
if (bfGood != null) {
bfGood.animation.play('fall', true, false, 14);
}
};
});
add(bfGood);

case SHIT:
Expand Down Expand Up @@ -384,7 +384,7 @@ class ResultsSubstate extends MusicBeatSubstate {
try {
scorePopin.visible = true;
scorePopin.animation.play("score");
scorePopin.animation.finishCallback = anim -> {};
scorePopin.animation.onFinish.add(anim -> {});
} catch (e) {
#if debug
trace(e, ERROR);
Expand Down Expand Up @@ -420,7 +420,7 @@ class ResultsSubstate extends MusicBeatSubstate {
try {
highscoreNew.visible = true;
highscoreNew.animation.play("new");
highscoreNew.animation.finishCallback = _ -> highscoreNew.animation.play("new", true, false, 16);
highscoreNew.animation.onFinish.add((animName:String) -> highscoreNew.animation.play("new", true, false, 16));
} catch (e) {}
} else {
highscoreNew.visible = false;
Expand Down Expand Up @@ -576,7 +576,7 @@ class ResultsSubstate extends MusicBeatSubstate {
// ratingsPopin.animation.play("idle");
// ratingsPopin.visible = true;

ratingsPopin.animation.finishCallback = anim -> {
ratingsPopin.animation.onFinish.add((animName:String) -> {
// scorePopin.animation.play("score");

// scorePopin.visible = true;
Expand All @@ -587,7 +587,7 @@ class ResultsSubstate extends MusicBeatSubstate {
} else {
highscoreNew.visible = false;
}
};
});
}

// refresh();
Expand Down
8 changes: 4 additions & 4 deletions source/toolbox/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,19 @@ class ChartingState extends MusicBeatState {
lilBf.frames = Paths.getSparrowAtlas("charter/lil_bf", "shared");
lilBf.animation.addByPrefix("idle", "idle", 12, true);
lilBf.animation.play("idle", true);
lilBf.animation.finishCallback = function(name:String) {
lilBf.animation.onFinish.add(function(name:String) {
lilBf.animation.play(name, true, false, lilBf.animation.getByName(name).numFrames - 2);
}
});
lilBf.scrollFactor.set();
add(lilBf);

lilOpp = new FlxSprite(30, 545);
lilOpp.frames = Paths.getSparrowAtlas("charter/lil_opp", "shared");
lilOpp.animation.addByPrefix("idle", "idle", 12, true);
lilOpp.animation.play("idle", true);
lilOpp.animation.finishCallback = function(name:String) {
lilOpp.animation.onFinish.add(function(name:String) {
lilOpp.animation.play(name, true, false, lilOpp.animation.getByName(name).numFrames - 2);
}
});
lilOpp.scrollFactor.set();
add(lilOpp);

Expand Down
4 changes: 2 additions & 2 deletions source/ui/DialogueBox.hx
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ class DialogueBox extends FlxSpriteGroup
if(current_Section.box_Anim != null && current_Section.box_Anim != "")
box.animation.addByPrefix("loop", current_Section.box_Anim, current_Section.box_FPS, true);

box.animation.finishCallback = function(animName:String) {
box.animation.onFinish.add(function(animName:String) {
if(animName == "open")
box.animation.play("loop");
}
});

box.animation.play("loop", true);

Expand Down
5 changes: 0 additions & 5 deletions source/utilities/Controls.hx
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,6 @@ class Controls extends FlxActionSet {
}
}

static function init():Void {
var actions = new FlxActionManager();
FlxG.inputs.add(actions);
}

/**
* Calls a function passing each action bound by the specified control
* @param control
Expand Down

0 comments on commit 88f42ca

Please sign in to comment.