wave hand emote

This commit is contained in:
NguyenVanDat
2025-12-16 18:28:01 +07:00
parent 4065ed3c52
commit 61b54ee1ba
3 changed files with 20 additions and 1 deletions
+12
View File
@@ -1,3 +1,4 @@
using System;
using Animancer;
using BrewMonster;
using System.Collections.Generic;
@@ -150,6 +151,7 @@ namespace BrewMonster
return namedAnimancer.States.TryGet("ActionName", out var existingState) ? true : false;
}
private string _currentAnimationName;
/// <summary>
/// play an animation with name
/// </summary>
@@ -158,7 +160,17 @@ namespace BrewMonster
/// <param name="fadeMode"></param>
private void InternalPlayAnimation(string animationName, float duration = FadeTime, FadeMode fadeMode = FadeMode)
{
// if (string.CompareOrdinal(_currentAnimationName, "招手_通用") == 0)
// {
// Debug.LogError(0);
// return;
// }
if (string.CompareOrdinal(animationName, "招手_通用") == 0)
{
Debug.LogError(2);
}
_currentState = namedAnimancer.TryPlay(animationName, duration, fadeMode);
_currentAnimationName = animationName;
if (_currentState == null)
{
BMLogger.LogError($"Null animation with name: {animationName}");