Update for combat netcode

This commit is contained in:
unknown
2022-12-21 19:25:32 +02:00
parent 57c740e6ce
commit ead3c04266
6 changed files with 764 additions and 663 deletions

View File

@@ -34,6 +34,16 @@ public class DemonicsAnimator : MonoBehaviour
}
return maxFrames;
}
public static int GetMaxAnimationFrames(AnimationSO animation, string name = "Idle")
{
int maxFrames = 0;
int group = animation.GetGroupId(name);
for (int i = 0; i < animation.GetGroup(group).animationCel.Count; i++)
{
maxFrames += animation.GetGroup(group).animationCel[i].frames;
}
return maxFrames;
}
public virtual void SetAnimation(string name)
{