void Start() { //Make sure all animations are accounted for. for (int i = 0; i < AnimChildren.Length; ++i) { if (AnimChildren[i].Object == null) { Debug.LogError("Animation child object for '" + AnimChildren[i].State + "' is null!"); } } foreach (ElveAnimStates state in Enum.GetValues(typeof(ElveAnimStates))) { bool found = false; for (int i = 0; i < AnimChildren.Length; ++i) { if (AnimChildren[i].State == state) { found = true; break; } } if (!found) { Debug.LogError("Couldn't find animation object for '" + state + "'!"); } } AnimState = ElveAnimStates.IdleFloor; }
public StateAndObject(ElveAnimStates state) { State = state; }