simple force event null bugfix

idk we were bored and started a liveshare

Co-Authored-By: Ne_Eo <NeeEoo@users.noreply.github.com>
This commit is contained in:
⍚~Nex
2024-09-10 00:00:54 +02:00
co-authored by Ne_Eo
parent ae5fc555a8
commit 680cb973a1
4 changed files with 5 additions and 5 deletions
@@ -28,7 +28,7 @@ final class DirectionAnimEvent extends CancellableEvent {
**/
public var frame:Int;
/**
Force the animation to replay even if it's already playing.
Force the animation to replay even if it's already playing (if it's null it will be forced based on the sprite's data xml, if it has one).
**/
public var force:Bool = true;
public var force:Null<Bool>;
}
@@ -102,7 +102,7 @@ final class NoteHitEvent extends CancellableEvent {
/**
* Whenever the animation should be forced to play (if it's null it will be forced based on the sprite's data xml, if it has one).
*/
public var forceAnim:Null<Bool> = true;
public var forceAnim:Null<Bool> = null;
/**
* Prevents the default sing animation from being played.
+1 -1
View File
@@ -207,7 +207,7 @@ class Character extends FunkinSprite implements IBeatReceiver implements IOffset
}
public var singAnims = ["singLEFT", "singDOWN", "singUP", "singRIGHT"];
public function playSingAnim(direction:Int, suffix:String = "", Context:PlayAnimContext = SING, ?Force:Bool = true, Reversed:Bool = false, Frame:Int = 0) {
public function playSingAnim(direction:Int, suffix:String = "", Context:PlayAnimContext = SING, ?Force:Null<Bool> = null, Reversed:Bool = false, Frame:Int = 0) {
var event = EventManager.get(DirectionAnimEvent).recycle(singAnims[direction % singAnims.length] + suffix, direction, suffix, Context, Reversed, Frame, Force);
script.call("onPlaySingAnim", [event]);
if (!event.cancelled)
+1 -1
View File
@@ -1919,7 +1919,7 @@ class PlayState extends MusicBeatState
}
}
class ComboRating {
final class ComboRating {
public var percent:Float;
public var rating:String;
public var color:FlxColor;