Fixed macro issue
This commit is contained in:
@@ -5,7 +5,7 @@ import flixel.math.FlxMatrix;
|
||||
import flixel.math.FlxPoint;
|
||||
import flixel.math.FlxRect;
|
||||
import flixel.system.FlxAssets.FlxGraphicAsset;
|
||||
import funkin.backend.scripting.events.PlayAnimEvent.PlayAnimContext;
|
||||
import funkin.backend.scripting.events.PlayAnimContext;
|
||||
import funkin.backend.system.interfaces.IBeatReceiver;
|
||||
import funkin.backend.system.interfaces.IOffsetCompatible;
|
||||
import funkin.backend.utils.XMLUtil.AnimData;
|
||||
@@ -19,9 +19,9 @@ enum abstract XMLAnimType(Int)
|
||||
var BEAT = 1;
|
||||
var LOOP = 2;
|
||||
|
||||
public static function fromString(str:String, def:XMLAnimType = NONE)
|
||||
public static function fromString(str:String, def:XMLAnimType = XMLAnimType.NONE)
|
||||
{
|
||||
return switch (str.trim().toLowerCase())
|
||||
return switch (StringTools.trim(str).toLowerCase())
|
||||
{
|
||||
case "none": NONE;
|
||||
case "beat" | "onbeat": BEAT;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package funkin.backend.scripting.events;
|
||||
|
||||
import funkin.backend.scripting.events.PlayAnimEvent.PlayAnimContext;
|
||||
|
||||
final class DirectionAnimEvent extends CancellableEvent {
|
||||
/**
|
||||
Default animation that will be played
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package funkin.backend.scripting.events;
|
||||
|
||||
/**
|
||||
Contains all contexts possible for `PlayAnimEvent`.
|
||||
**/
|
||||
enum abstract PlayAnimContext(String) {
|
||||
/**
|
||||
No context was given for the animation.
|
||||
The character won't dance until the animation is finished
|
||||
**/
|
||||
var NONE = null;
|
||||
|
||||
/**
|
||||
Whenever a note is hit and a sing animation will be played.
|
||||
The character will only dance after their holdTime is reached.
|
||||
**/
|
||||
var SING = "SING";
|
||||
|
||||
/**
|
||||
Whenever a dance animation is played.
|
||||
The character's dancing wont be blocked.
|
||||
**/
|
||||
var DANCE = "DANCE";
|
||||
|
||||
/**
|
||||
Whenever a note is missed and a miss animation will be played.
|
||||
Only for scripting, since it has the same effects as SING.
|
||||
**/
|
||||
var MISS = "MISS";
|
||||
|
||||
/**
|
||||
Locks the character's animation.
|
||||
Prevents the character from dancing, even if the animation ended.
|
||||
**/
|
||||
var LOCK = "LOCK";
|
||||
}
|
||||
@@ -25,39 +25,4 @@ final class PlayAnimEvent extends CancellableEvent {
|
||||
Context of the animation
|
||||
**/
|
||||
public var context:PlayAnimContext;
|
||||
}
|
||||
|
||||
/**
|
||||
Contains all contexts possible for `PlayAnimEvent`.
|
||||
**/
|
||||
enum abstract PlayAnimContext(String) {
|
||||
/**
|
||||
No context was given for the animation.
|
||||
The character won't dance until the animation is finished
|
||||
**/
|
||||
var NONE = null;
|
||||
|
||||
/**
|
||||
Whenever a note is hit and a sing animation will be played.
|
||||
The character will only dance after their holdTime is reached.
|
||||
**/
|
||||
var SING = "SING";
|
||||
|
||||
/**
|
||||
Whenever a dance animation is played.
|
||||
The character's dancing wont be blocked.
|
||||
**/
|
||||
var DANCE = "DANCE";
|
||||
|
||||
/**
|
||||
Whenever a note is missed and a miss animation will be played.
|
||||
Only for scripting, since it has the same effects as SING.
|
||||
**/
|
||||
var MISS = "MISS";
|
||||
|
||||
/**
|
||||
Locks the character's animation.
|
||||
Prevents the character from dancing, even if the animation ended.
|
||||
**/
|
||||
var LOCK = "LOCK";
|
||||
}
|
||||
Reference in New Issue
Block a user