add delay for animation
This commit is contained in:
@@ -269,7 +269,7 @@ namespace BrewMonster
|
||||
return false;
|
||||
}
|
||||
m_isCastingSkill = true;
|
||||
int iTransTime = 0;
|
||||
int iTransTime = 200;
|
||||
EventBus.PublishChannel(m_pPlayer.GetPlayerInfo().cid, new PlayActionEvent(szActName,iTransTime));
|
||||
return true;
|
||||
}
|
||||
@@ -285,7 +285,7 @@ namespace BrewMonster
|
||||
return false;
|
||||
}
|
||||
m_isCastingSkill = true;
|
||||
int iTransTime = 0;
|
||||
int iTransTime = 200;
|
||||
EventBus.PublishChannel(m_pPlayer.GetPlayerInfo().cid, new PlayActionEvent(szActName,iTransTime));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -133,6 +133,7 @@ namespace BrewMonster
|
||||
//peek next if IsForceStopPrevious is true, force end
|
||||
if (_animationQueue.Peek().IsForceStopPrevious)
|
||||
{
|
||||
Debug.Log($" InternalPlayAnimation PlayNext: Force Stop Previous");
|
||||
_currentState.Stop();
|
||||
_currentState = null;
|
||||
}
|
||||
@@ -173,7 +174,7 @@ namespace BrewMonster
|
||||
/// <param name="fadeMode"></param>
|
||||
private void InternalPlayAnimation(string animationName, float duration = FadeTime, FadeMode fadeMode = FadeMode)
|
||||
{
|
||||
|
||||
//Debug.Log($"InternalPlayAnimation: animationName FUllNAME={animationName}");
|
||||
string fullName = animationName;
|
||||
string removeShapeName = animationName;
|
||||
string removeFlyName = animationName;
|
||||
@@ -183,17 +184,12 @@ namespace BrewMonster
|
||||
|
||||
removeShapeName = animationName.Substring(underscoreIndex + 1);
|
||||
}
|
||||
if (isDebug)
|
||||
{
|
||||
BMLogger.LogError($"InternalPlayAnimation: original={animationName}, removeShapeName={removeShapeName}");
|
||||
}
|
||||
|
||||
|
||||
bool isState = namedAnimancer.States.TryGet(removeShapeName, out var existingState) ? true : false;
|
||||
if (isState)
|
||||
{
|
||||
_currentState = namedAnimancer.TryPlay(removeShapeName, duration / 1000, fadeMode);
|
||||
_currentAnimationName = removeShapeName;
|
||||
//Debug.Log($"InternalPlayAnimation: removeShapeName 1 TriggerName={removeShapeName}");
|
||||
return;
|
||||
}
|
||||
bool isState2 = namedAnimancer.States.TryGet(fullName, out var existingState2) ? true : false;
|
||||
@@ -240,6 +236,34 @@ namespace BrewMonster
|
||||
_currentAnimationName = removeFlyName;
|
||||
return;
|
||||
}
|
||||
if (fullName2.Contains("_通用"))
|
||||
{
|
||||
fullName2 = fullName2.Replace("_通用", "");
|
||||
removeShapeName = removeShapeName.Replace("_通用", "");
|
||||
removeFlyName = removeFlyName.Replace("_通用", "");
|
||||
}
|
||||
bool isState6 = namedAnimancer.States.TryGet(fullName2, out var existingState6) ? true : false;
|
||||
if (isState6)
|
||||
{
|
||||
_currentState = namedAnimancer.TryPlay(fullName2, duration / 1000, fadeMode);
|
||||
_currentAnimationName = fullName2;
|
||||
return;
|
||||
}
|
||||
|
||||
bool isState8 = namedAnimancer.States.TryGet(removeShapeName, out var existingState8) ? true : false;
|
||||
if (isState8)
|
||||
{
|
||||
_currentState = namedAnimancer.TryPlay(removeShapeName, duration / 1000, fadeMode);
|
||||
_currentAnimationName = removeShapeName;
|
||||
return;
|
||||
}
|
||||
bool isState7 = namedAnimancer.States.TryGet(removeFlyName, out var existingState7) ? true : false;
|
||||
if (isState7)
|
||||
{
|
||||
_currentState = namedAnimancer.TryPlay(removeFlyName, duration / 1000, fadeMode);
|
||||
_currentAnimationName = removeFlyName;
|
||||
return;
|
||||
}
|
||||
BMLogger.LogError($"Null name animation: {fullName}");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user