latest build

This commit is contained in:
Yoshman29
2022-10-27 14:34:54 +02:00
parent 8432587fc0
commit 2398a44ed8
16 changed files with 112 additions and 34 deletions
@@ -0,0 +1,55 @@
package funkin.scripting.events;
import funkin.game.Note;
import funkin.game.Strum;
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:Float;
/**
* Note's strum (can be changed)
*/
public var strum:Strum;
public function new(note:Note, elapsed:Float, strum:Strum) {
super();
this.note = note;
this.elapsed = elapsed;
this.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(); }
}