public void SyncAnimation(String animationValue) { currentAnimation = (AniStates)Enum.Parse (typeof(AniStates), animationValue); if (gameObject.name.Contains ("Remote")) { print ("SyncAnimation : " + animationValue); print ("currentAnimation : " + currentAnimation); } }
// Update is called once per frame void Update() { if (lastAnimation != currentAnimation) { lastAnimation = currentAnimation; animation.CrossFade (Enum.GetName (typeof(AniStates), currentAnimation)); animation["run"].normalizedSpeed = 1.0f; animation["walk"].normalizedSpeed = 1.0f; } }
public void SyncAnimation(String animationValue) { currentAnimation = (AniStates)Enum.Parse(typeof(AniStates), animationValue); if (gameObject.name.Contains("Remote")) { print("SyncAnimation : " + animationValue); print("currentAnimation : " + currentAnimation); } }
// Update is called once per frame void Update() { if (lastAnimation != currentAnimation) { lastAnimation = currentAnimation; animation.CrossFade(Enum.GetName(typeof(AniStates), currentAnimation)); //animation["run"].normalizedSpeed = 1.0F; animation["walk"].normalizedSpeed = 1.0F; } }
void OnSerializeNetworkView(BitStream stream, NetworkMessageInfo info) { if (stream.isWriting) { char ani = (char)currentAnimation; stream.Serialize (ref ani); } else { char ani = (char)0; stream.Serialize (ref ani); currentAnimation = (AniStates)ani; } }
void OnSerializeNetworkView(BitStream stream, NetworkMessageInfo info) { if (stream.isWriting) { char ani = (char)currentAnimation; stream.Serialize(ref ani); } else { char ani = (char)0; stream.Serialize(ref ani); currentAnimation = (AniStates)ani; } }
public void SyncAnimation(String animationValue) { currentAnimation = (AniStates)Enum.Parse(typeof(AniStates), animationValue); }