コード例 #1
0
ファイル: ElveAnimController.cs プロジェクト: heyx3/Elve
    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;
    }
コード例 #2
0
ファイル: ElveAnimController.cs プロジェクト: heyx3/Elve
 public StateAndObject(ElveAnimStates state)
 {
     State = state;
 }