Esempio n. 1
0
    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;
    }
Esempio n. 2
0
 public StateAndObject(ElveAnimStates state)
 {
     State = state;
 }