Files
CodenameEngine/source/funkin/scripting/events/NoteHitEvent.hx
T
2022-10-09 23:21:25 +02:00

41 lines
1021 B
Haxe

package funkin.scripting.events;
import funkin.game.Note;
import funkin.game.Character;
class NoteHitEvent extends CancellableEvent {
@:dox(hide) public var animCancelled:Bool = false;
public var note:Note;
public var character:Character;
public var player:Bool;
public var noteType:String;
public var direction:Int;
/**
* Creates a new NoteHitEvent with the following values:
* @param note
* @param character
* @param player
* @param noteType
*/
public function new(note:Note, character:Character, player:Bool, noteType:String, direction:Int) {
super();
this.note = note;
this.character = character;
this.player = player;
this.noteType = noteType;
this.direction = direction;
}
/**
* Prevents the default sing animation from being played.
*/
public function preventAnim() {
animCancelled = true;
}
@:dox(hide)
public function cancelAnim() {preventAnim();}
}