コード例 #1
0
ファイル: PlayAction.cs プロジェクト: midgithub/notes
    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
ファイル: PlayAction.cs プロジェクト: midgithub/notes
    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);
                }
            }
        }
    }