fix pose action
This commit is contained in:
@@ -20,7 +20,7 @@ namespace BrewMonster
|
||||
[SerializeField] private int id;
|
||||
|
||||
private const float FadeTime = 0.1f;
|
||||
private const FadeMode FadeMode = Animancer.FadeMode.FixedDuration;
|
||||
private const FadeMode FadeMode = Animancer.FadeMode.NormalizedDuration;
|
||||
QueueActionEvent queueActionEvent;
|
||||
|
||||
private void PlayActionEventHandler(PlayActionEvent @event)
|
||||
@@ -31,7 +31,7 @@ namespace BrewMonster
|
||||
_animationList = _animationQueue.ToList();
|
||||
return;
|
||||
}
|
||||
InternalPlayAnimation(@event.AnimationName);
|
||||
InternalPlayAnimation(@event.AnimationName, @event.ITransTime);
|
||||
}
|
||||
public void InitPlayerEventDoneHandler()
|
||||
{
|
||||
@@ -130,7 +130,8 @@ namespace BrewMonster
|
||||
}
|
||||
string animName = _animationQueue.Dequeue();
|
||||
_animationList = _animationQueue.ToList();
|
||||
InternalPlayAnimation(animName);
|
||||
//TODO: default fadetime = 200 remake later
|
||||
InternalPlayAnimation(animName,200);
|
||||
}
|
||||
void ApplyDamage()
|
||||
{
|
||||
@@ -160,7 +161,7 @@ namespace BrewMonster
|
||||
/// <param name="fadeMode"></param>
|
||||
private void InternalPlayAnimation(string animationName, float duration = FadeTime, FadeMode fadeMode = FadeMode)
|
||||
{
|
||||
_currentState = namedAnimancer.TryPlay(animationName, duration, fadeMode);
|
||||
_currentState = namedAnimancer.TryPlay(animationName, duration / 1000, fadeMode);
|
||||
_currentAnimationName = animationName;
|
||||
if (_currentState == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user