コード例 #1
0
    public void SequenceTest()
    {
        List <AnimeAction> actionList = new List <AnimeAction>();
        AnimatorAction     action;

        action              = new AnimatorAction();
        action.name         = "vfx1";
        action.animator     = animator1;
        action.triggerState = "Thunder";
        actionList.Add(action);

        action              = new AnimatorAction();
        action.name         = "vfx2";
        action.animator     = animator2;
        action.triggerState = "Fire";
        actionList.Add(action);

        DelayAction delay = new DelayAction();

        delay.SetDuration(1.0f);
        actionList.Add(delay);

        action              = new AnimatorAction();
        action.name         = "vfx3";
        action.animator     = animator1;
        action.triggerState = "Thunder";
        actionList.Add(action);


        SequenceAction sequence = new SequenceAction();

        sequence.name = "sequence";
        sequence.AddActionList(actionList);

        actionManager.RunAction(sequence);
        //action.animator = bat
    }