Constructor

@:value({ score : 350, unmuteVocals : true })new(note:Note, character:Character, player:Bool, noteType:String, direction:Int, healthGain:Float, unmuteVocals:Bool = true, score:Int = 350)

Creates a new NoteHitEvent.

Variables

character:Character

Character that pressed the note

direction:Int

Direction of the press (0 = Left, 1 = Down, 2 = Up, 3 = Right)

healthGain:Float

The amount of health that'll be gained from pressing that note. If called from onNoteMiss, the value will be negative.

@:value(true)misses:Bool = true

Whenever a miss should be added.

note:Note

Note that has been pressed

noteType:String

Note Type name (null if default note)

player:Bool

Whenever the Character is the player

score:Int

Score gained after note press.

Methods

preventAnim():Void

Prevents the default sing animation from being played.

preventCamZooming():Void

Prevents the camera zoom every 4 beats from enabling.

preventDeletion():Void

Prevents the note from being deleted.

preventVocalsMute():Void

Prevents the vocals volume from being muted in case its a parameter of onNoteMiss

preventVocalsUnmute():Void

Prevents the vocals volume from being set to 1 after pressing the note.

Inherited Variables

Defined by CancellableEvent

@:value({ })data:Dynamic = { }

Additional data if used in scripts

Inherited Methods

Defined by CancellableEvent

@:value({ c : true })preventDefault(c:Bool = true):Void

Prevents default action from occuring.

Parameters:

c

Whenever the scripts following this one should be called or not. (Defaults to true)

toString():String

Returns a string representation of the event, in this format: [CancellableEvent] [CancellableEvent (Cancelled)]

Returns:

String