better events and funkinSave categorization

This commit is contained in:
⍚~Nex
2024-11-15 17:52:19 +01:00
parent 1713e8700d
commit 77b7eebed1
56 changed files with 161 additions and 125 deletions
@@ -0,0 +1,48 @@
package funkin.backend.scripting.events.note;
import funkin.game.Note;
import funkin.game.Strum;
final class NoteUpdateEvent extends CancellableEvent {
@:dox(hide) public var __updateHitWindow = true;
@:dox(hide) public var __autoCPUHit = true;
@:dox(hide) public var __reposNote = true;
/**
* Note that is being updated
*/
public var note:Note;
/**
* Time elapsed since last frame
*/
public var elapsed:Null<Float>;
/**
* Note's strum (can be changed)
*/
public var strum:Strum;
/**
* Cancels the hit window update.
*/
public function cancelWindowUpdate() {
__updateHitWindow = false;
}
@:dox(hide) public function preventWindowUpdate() { cancelWindowUpdate(); }
/**
* Cancels the automatic CPU hit.
*/
public function cancelAutoCPUHit() {
__autoCPUHit = false;
}
@:dox(hide) public function preventAutoCPUHit() { cancelAutoCPUHit(); }
/**
* Cancels the note position update (note will freeze).
*/
public function cancelPositionUpdate() {
__reposNote = false;
}
@:dox(hide) public function preventPositionUpdate() { cancelPositionUpdate(); }
}