6 public static class AnimatorUtils
11 public static void RandomizeCurrentAnimation (
this Animator
self)
13 self.Play(
self.GetCurrentAnimatorStateInfo(0).nameHash, 0, Random.Range(0f, 1f));
16 public static void CrossFadeSynced (
this Animator
self,
int stateNameHash,
float transitionDuration = 0.2f,
int layer = -1)
18 Sync sync =
self.GetComponent<
Sync>();
21 msg.Write(stateNameHash);
22 msg.Write(transitionDuration);
25 sync.AnimationMessages[0] = msg;
A class for serializing game data into a stream for propagation between objects and peers...
This class server two main functions: 1) As a MonoBehaviour, it allows for network synchronization of...