Better strumline note confirm animations
This commit is contained in:
@@ -40,7 +40,7 @@ class StrumlineNote extends FunkinSprite
|
||||
/**
|
||||
* How long to continue the hold note animation after a note is pressed.
|
||||
*/
|
||||
static final CONFIRM_HOLD_TIME:Float = 0.1;
|
||||
static final CONFIRM_HOLD_TIME:Float = 0.15;
|
||||
|
||||
/**
|
||||
* How long the hold note animation has been playing after a note is pressed.
|
||||
@@ -72,9 +72,8 @@ class StrumlineNote extends FunkinSprite
|
||||
function onAnimationFinished(name:String):Void
|
||||
{
|
||||
// Run a timer before we stop playing the confirm animation.
|
||||
// On opponent, this prevent issues with hold notes.
|
||||
// On player, this allows holding the confirm key to fall back to press.
|
||||
if (name == 'confirm')
|
||||
if (isPlayer && name == 'confirm')
|
||||
{
|
||||
confirmHoldTimer = 0;
|
||||
}
|
||||
@@ -143,6 +142,10 @@ class StrumlineNote extends FunkinSprite
|
||||
{
|
||||
this.active = (forceActive || isAnimationDynamic('confirm'));
|
||||
this.playAnimation('confirm', true);
|
||||
|
||||
// On opponent, run a timer to stop playing the confirm animation.
|
||||
// On player, stop the timer to avoid stopping the confirm animation earlier.
|
||||
confirmHoldTimer = isPlayer ? -1 : 0;
|
||||
}
|
||||
|
||||
public function isConfirm():Bool
|
||||
|
||||
Reference in New Issue
Block a user