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;
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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;
        }
    }
Exemplo n.º 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);
 }
Exemplo n.º 8
0
 public void SyncAnimation(String animationValue)
 {
     currentAnimation = (AniStates)Enum.Parse(typeof(AniStates), animationValue);
 }