コード例 #1
0
    public void LaunchCutscene(Cutscene c)
    {
        CutscenePlayer cp     = gameObject.AddComponent <CutscenePlayer> ();
        Cutscene       cClone = Instantiate <Cutscene> (c);

        cClone.transform.parent = transform;
        Action[] clones = new Action[c.actions.Length];
        for (int i = 0; i < c.actions.Length; i++)
        {
            clones [i] = Instantiate <Action> (c.actions [i]);
            clones [i].transform.parent = cClone.transform;
        }
        cClone.actions = clones;
        cp.Launch(cClone);
    }