1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-05-06 06:54:47 +00:00

Fix background props not bopping on Week 5

This commit is contained in:
EliteMasterEric 2024-07-09 04:20:42 -04:00
parent 7a653707a8
commit cb4620d33a
2 changed files with 130 additions and 19 deletions

View file

@ -177,7 +177,7 @@ class Bopper extends StageProp implements IPlayStateScriptedClass
*/
public function onStepHit(event:SongTimeScriptEvent)
{
if (danceEvery > 0) trace('step hit(${danceEvery}): ${event.step % (danceEvery * Constants.STEPS_PER_BEAT)} == 0?');
if (danceEvery > 0) trace('step hit(${danceEvery}, ${shouldBop}): ${event.step % (danceEvery * Constants.STEPS_PER_BEAT)} == 0?');
if (danceEvery > 0 && (event.step % (danceEvery * Constants.STEPS_PER_BEAT)) == 0)
{
trace('dance onStepHit!');

View file

@ -769,7 +769,16 @@ class Stage extends FlxSpriteGroup implements IPlayStateScriptedClass implements
* A function that gets called once per step in the song.
* @param curStep The current step number.
*/
public function onStepHit(event:SongTimeScriptEvent):Void {}
public function onStepHit(event:SongTimeScriptEvent):Void
{
// Override me in your scripted stage to perform custom behavior!
// Make sure to call super.onStepHit(event) if you want to keep the boppers dancing.
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
/**
* A function that gets called once per beat in the song (once every four steps).
@ -786,7 +795,13 @@ class Stage extends FlxSpriteGroup implements IPlayStateScriptedClass implements
}
}
public function onUpdate(event:UpdateScriptEvent) {}
public function onUpdate(event:UpdateScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public override function kill()
{
@ -866,35 +881,131 @@ class Stage extends FlxSpriteGroup implements IPlayStateScriptedClass implements
return StageRegistry.instance.parseEntryDataWithMigration(id, StageRegistry.instance.fetchEntryVersion(id));
}
public function onScriptEvent(event:ScriptEvent) {}
public function onScriptEvent(event:ScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onPause(event:PauseScriptEvent) {}
public function onPause(event:PauseScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onResume(event:ScriptEvent) {}
public function onResume(event:ScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onSongStart(event:ScriptEvent) {}
public function onSongStart(event:ScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onSongEnd(event:ScriptEvent) {}
public function onSongEnd(event:ScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onGameOver(event:ScriptEvent) {}
public function onGameOver(event:ScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onCountdownStart(event:CountdownScriptEvent) {}
public function onCountdownStart(event:CountdownScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onCountdownStep(event:CountdownScriptEvent) {}
public function onCountdownStep(event:CountdownScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onCountdownEnd(event:CountdownScriptEvent) {}
public function onCountdownEnd(event:CountdownScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onNoteIncoming(event:NoteScriptEvent) {}
public function onNoteIncoming(event:NoteScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onNoteHit(event:HitNoteScriptEvent) {}
public function onNoteHit(event:HitNoteScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onNoteMiss(event:NoteScriptEvent) {}
public function onNoteMiss(event:NoteScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onSongEvent(event:SongEventScriptEvent) {}
public function onSongEvent(event:SongEventScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onNoteGhostMiss(event:GhostMissNoteScriptEvent) {}
public function onNoteGhostMiss(event:GhostMissNoteScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onSongLoaded(event:SongLoadScriptEvent) {}
public function onSongLoaded(event:SongLoadScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
public function onSongRetry(event:ScriptEvent) {}
public function onSongRetry(event:ScriptEvent)
{
for (bopper in boppers)
{
ScriptEventDispatcher.callEvent(bopper, event);
}
}
}