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; } } }
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; } } }
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); }
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; } } }
public void SetStopAnim() { Transform[] trans; trans = transform.GetComponentsInChildren <Transform>(); foreach (Transform ObjectTrans in trans) { if (ObjectTrans.GetComponent <Animation>()) { ObjectTrans.GetComponent <Animation>().Stop(); break; } } }