-
Notifications
You must be signed in to change notification settings - Fork 181
/
NoteUpdateEvent.hx
48 lines (41 loc) · 1.07 KB
/
NoteUpdateEvent.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package funkin.backend.scripting.events;
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(); }
}