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;
     }
 }
Example #3
0
 public void SyncAnimation(String animationValue)
 {
     currentAnimation = (AniStates)Enum.Parse(typeof(AniStates), animationValue);
     if (gameObject.name.Contains("Remote"))
     {
         print("SyncAnimation : " + animationValue);
         print("currentAnimation : " + currentAnimation);
     }
 }
Example #4
0
 // 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;
        }
    }
Example #6
0
    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);
 }
Example #8
0
 public void SyncAnimation(String animationValue)
 {
     currentAnimation = (AniStates)Enum.Parse(typeof(AniStates), animationValue);
 }