Set 'idle' as an fallback to correctAnimationName

This commit is contained in:
Ralty 2024-05-17 11:25:27 +07:00 committed by GitHub
parent 5ea45b4ef7
commit 3df30c259f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -229,7 +229,7 @@ class Bopper extends StageProp implements IPlayStateScriptedClass
* @param name The animation name to attempt to correct.
* @param fallback Instead of failing to play, try to play this animation instead.
*/
function correctAnimationName(name:String, ?fallback:String):String
function correctAnimationName(name:String, ?fallback:String = 'idle'):String
{
// If the animation exists, we're good.
if (hasAnimation(name)) return name;