mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-27 15:37:49 +00:00
character animation dance force is OFF
This commit is contained in:
parent
112a9ee329
commit
31b393b014
|
@ -1,12 +1,12 @@
|
||||||
package funkin.play.character;
|
package funkin.play.character;
|
||||||
|
|
||||||
import funkin.play.character.CharacterData.CharacterDataParser;
|
|
||||||
import flixel.math.FlxPoint;
|
import flixel.math.FlxPoint;
|
||||||
import funkin.modding.events.ScriptEvent;
|
|
||||||
import funkin.modding.events.ScriptEvent.UpdateScriptEvent;
|
|
||||||
import funkin.play.character.CharacterData.CharacterDataParser;
|
|
||||||
import funkin.Note.NoteDir;
|
import funkin.Note.NoteDir;
|
||||||
import funkin.modding.events.ScriptEvent.NoteScriptEvent;
|
import funkin.modding.events.ScriptEvent.NoteScriptEvent;
|
||||||
|
import funkin.modding.events.ScriptEvent.UpdateScriptEvent;
|
||||||
|
import funkin.modding.events.ScriptEvent;
|
||||||
|
import funkin.play.character.CharacterData.CharacterDataParser;
|
||||||
|
import funkin.play.character.CharacterData.CharacterDataParser;
|
||||||
import funkin.play.stage.Bopper;
|
import funkin.play.stage.Bopper;
|
||||||
|
|
||||||
using StringTools;
|
using StringTools;
|
||||||
|
@ -124,6 +124,8 @@ class BaseCharacter extends Bopper
|
||||||
this.singTimeCrochet = _data.singTime;
|
this.singTimeCrochet = _data.singTime;
|
||||||
this.globalOffsets = _data.offsets;
|
this.globalOffsets = _data.offsets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shouldBop = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -213,8 +215,9 @@ class BaseCharacter extends Bopper
|
||||||
var shouldStopSinging:Bool = (this.characterType == BF) ? !isHoldingNote() : true;
|
var shouldStopSinging:Bool = (this.characterType == BF) ? !isHoldingNote() : true;
|
||||||
|
|
||||||
FlxG.watch.addQuick('singTimeMs-${characterId}', singTimeMs);
|
FlxG.watch.addQuick('singTimeMs-${characterId}', singTimeMs);
|
||||||
if (holdTimer > singTimeMs && shouldStopSinging)
|
if (holdTimer > singTimeMs && shouldStopSinging && !getCurrentAnimation().endsWith("miss"))
|
||||||
{
|
{
|
||||||
|
trace(getCurrentAnimation());
|
||||||
// trace('holdTimer reached ${holdTimer}sec (> ${singTimeMs}), stopping sing animation');
|
// trace('holdTimer reached ${holdTimer}sec (> ${singTimeMs}), stopping sing animation');
|
||||||
holdTimer = 0;
|
holdTimer = 0;
|
||||||
dance(true);
|
dance(true);
|
||||||
|
|
|
@ -36,6 +36,12 @@ class Bopper extends FlxSprite implements IPlayStateScriptedClass
|
||||||
*/
|
*/
|
||||||
public var idleSuffix(default, set):String = "";
|
public var idleSuffix(default, set):String = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether this bopper should bop every beat. By default it's true, but when used
|
||||||
|
* for characters/players, it should be false so it doesn't cut off their animations!!!!!
|
||||||
|
*/
|
||||||
|
public var shouldBop:Bool = true;
|
||||||
|
|
||||||
function set_idleSuffix(value:String):String
|
function set_idleSuffix(value:String):String
|
||||||
{
|
{
|
||||||
this.idleSuffix = value;
|
this.idleSuffix = value;
|
||||||
|
@ -93,7 +99,7 @@ class Bopper extends FlxSprite implements IPlayStateScriptedClass
|
||||||
{
|
{
|
||||||
if (danceEvery > 0 && event.beat % danceEvery == 0)
|
if (danceEvery > 0 && event.beat % danceEvery == 0)
|
||||||
{
|
{
|
||||||
dance(true);
|
dance(shouldBop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue