Пример #1
0
    public void ActorPlayWithRoot(string paramName)
    {
        PA_Param param = FindParam(paramName);

        if (param == null)
        {
            return;
        }

        string actionName = param.GetString(0);

        if (actionName != "")
        {
            GameObject root = param.GetGameObject(0);
            if (root == null)
            {
                return;
            }

            Animation[] animList = root.GetComponentsInChildren <Animation>();
            for (int i = 0; i < animList.Length; ++i)
            {
                if (animList[i] != null)
                {
                    animList[i].Play(actionName);
                }
            }
        }
    }
Пример #2
0
    public void ActorPlay(string paramName)
    {
        PA_Param param = FindParam(paramName);

        if (param == null)
        {
            return;
        }

        string actionName = param.GetString(0);

        if (actionName != "")
        {
            for (int i = 0; i < param.ObjectList.Count; ++i)
            {
                Animation anim = param.ObjectList[i].GetComponent <Animation>();
                if (anim != null)
                {
                    anim.Play(actionName);
                }
            }
        }
    }