public void RandomPlay(bool reset) { if (timer > 0) { return; } Animator[] animators = EAnimator.GetComponentsInChildren <Animator>(); if (playClips.Count <= 0) { return; } IsPlaying = true; AnimationClip[] ac = new AnimationClip[playClips.Count]; playClips.Values.CopyTo(ac, 0); int random = Random.Range(0, ac.Length); string name = ac[random].name; timer = ac[random].length * 0.95f; EAnimator.speed = 1f; for (int i = 0; i < animators.Length; ++i) { animators[i].CrossFade(name, 0f, -1, float.NegativeInfinity); } if (reset) { StartCoroutine(StopAnimation(timer, "Idle")); } }
public int GetInteger(string name) { return(EAnimator.GetInteger(name)); }
public void SetTrigger(int id) { EAnimator.SetTrigger(id); }
public void SetLayerWeight(int layerIndex, float weight) { EAnimator.SetLayerWeight(layerIndex, weight); }
public void SetInteger(string name, int value) { EAnimator.SetInteger(name, value); }
public void SetFloat(string name, float value) { EAnimator.SetFloat(name, value); }
public void SetBool(string name, bool value) { EAnimator.SetBool(name, value); }
public void ResetTrigger(string name) { EAnimator.ResetTrigger(name); }
public AnimatorStateInfo GetNextAnimatorStateInfo(int layerIndex) { return(EAnimator.GetNextAnimatorStateInfo(layerIndex)); }
public int GetNextAnimatorClipInfoCount(int layerIndex) { return(EAnimator.GetNextAnimatorClipInfoCount(layerIndex)); }
public void GetNextAnimatorClipInfo(int layerIndex, List <AnimatorClipInfo> clips) { EAnimator.GetNextAnimatorClipInfo(layerIndex, clips); }
public AnimatorClipInfo[] GetNextAnimatorClipInfo(int layerIndex) { return(EAnimator.GetNextAnimatorClipInfo(layerIndex)); }
public float GetLayerWeight(int layerIndex) { return(EAnimator.GetLayerWeight(layerIndex)); }
public int GetLayerIndex(string layerName) { return(EAnimator.GetLayerIndex(layerName)); }
public int GetInteger(int id) { return(EAnimator.GetInteger(id)); }
public void PlayInFixedTime(string stateName, int layer, float fixedTime) { EAnimator.PlayInFixedTime(stateName, layer, fixedTime); }
public void PlayInFixedTime(int stateNameHash, int layer, float fixedTime) { EAnimator.PlayInFixedTime(stateNameHash, layer, fixedTime); }
public AnimatorControllerParameter GetParameter(int index) { return(EAnimator.GetParameter(index)); }
public void ResetTrigger(int id) { EAnimator.ResetTrigger(id); }
public bool HasState(int layerIndex, int stateID) { return(EAnimator.HasState(layerIndex, stateID)); }
public void SetBool(int id, bool value) { EAnimator.SetBool(id, value); }
public bool IsInTransition(int layerIndex) { return(EAnimator.IsInTransition(layerIndex)); }
public void SetFloat(int id, float value) { EAnimator.SetFloat(id, value); }
public bool IsParameterControlledByCurve(string name) { return(EAnimator.IsParameterControlledByCurve(name)); }
public void SetInteger(int id, int value) { EAnimator.SetInteger(id, value); }
public bool IsParameterControlledByCurve(int id) { return(EAnimator.IsParameterControlledByCurve(id)); }
public void SetTrigger(string name) { EAnimator.SetTrigger(name); }
public void Play(string stateName, int layer, float normalizedTime) { EAnimator.Play(stateName, layer, normalizedTime); }
public void Play(int stateNameHash, int layer, float normalizedTime) { EAnimator.Play(stateNameHash, layer, normalizedTime); }
public float GetFloat(int id) { return(EAnimator.GetFloat(id)); }