Exemplo n.º 1
0
 public void SetPlayAnim(string ObjectAnimName)
 {
     Transform[] trans;
     trans = transform.GetComponentsInChildren <Transform>();
     foreach (Transform ObjectTrans in trans)
     {
         if (ObjectTrans.GetComponent <Animation>())
         {
             ObjectTrans.GetComponent <Animation>().Play(ObjectAnimName);
             break;
         }
     }
 }
Exemplo n.º 2
0
 public void SetPlayAutomatiCally(bool IsValid)
 {
     Transform[] trans;
     trans = transform.GetComponentsInChildren <Transform>();
     foreach (Transform ObjectTrans in trans)
     {
         if (ObjectTrans.GetComponent <Animation>())
         {
             ObjectTrans.GetComponent <Animation>().playAutomatically = IsValid;
             break;
         }
     }
 }
Exemplo n.º 3
0
 public bool GetAnimPlaying()
 {
     Transform[] trans;
     trans = transform.GetComponentsInChildren <Transform>();
     foreach (Transform ObjectTrans in trans)
     {
         if (ObjectTrans.GetComponent <Animation>())
         {
             return(ObjectTrans.GetComponent <Animation>().isPlaying);
         }
     }
     return(false);
 }
Exemplo n.º 4
0
 public void SetAnimMode(WrapMode ObjectMode)
 {
     Transform[] trans;
     trans = transform.GetComponentsInChildren <Transform>();
     foreach (Transform ObjectTrans in trans)
     {
         if (ObjectTrans.GetComponent <Animation>())
         {
             ObjectTrans.GetComponent <Animation>().wrapMode = ObjectMode;
             break;
         }
     }
 }
Exemplo n.º 5
0
 public void SetStopAnim()
 {
     Transform[] trans;
     trans = transform.GetComponentsInChildren <Transform>();
     foreach (Transform ObjectTrans in trans)
     {
         if (ObjectTrans.GetComponent <Animation>())
         {
             ObjectTrans.GetComponent <Animation>().Stop();
             break;
         }
     }
 }