public void SetState(string key, bool value) { if (!value && AnimationStates.Contains(key)) { AnimationStates = AnimationStates.Where(each => each != key).ToArray(); } else if (value && !AnimationStates.Contains(key)) { AnimationStates = AnimationStates.Add(key); } GetAnimator().SetBool(key, value); }
public void SetState(string key, float value) { if (value == 0 && AnimationStates.Contains(key)) { AnimationStates = AnimationStates.Where(each => each != key).ToArray(); } else if (value != 0 && !AnimationStates.Contains(key)) { AnimationStates = AnimationStates.Add(key); } GetAnimator().SetFloat(key, value); }