コード例 #1
0
    public void DelayAction()
    {
        DelayAction action = new DelayAction();

        action.SetDuration(1.0f);


        actionManager.RunAction(action);
    }
コード例 #2
0
    public void ParallelTest()
    {
        ParallelAction parallel = new ParallelAction();

        parallel.name = "parallel";



        //AnimatorAction action;

        HitValueAction hitAction;

        hitAction = new HitValueAction();
        hitAction.valueTextPrefab = hitValuePrefab;
        hitAction.hitValue        = 999;
        hitAction.position        = new Vector3(0, 2, -2);
        parallel.AddAction(hitAction);

        hitAction = new HitValueAction();
        hitAction.valueTextPrefab = hitValuePrefab;
        hitAction.hitValue        = 888;
        hitAction.position        = new Vector3(1, 1, -2);
        parallel.AddAction(hitAction);

        hitAction = new HitValueAction();
        hitAction.valueTextPrefab = hitValuePrefab;
        hitAction.hitValue        = 777;
        hitAction.position        = new Vector3(2, 0, -2);
        parallel.AddAction(hitAction);


        DelayAction delay = new DelayAction();

        delay.SetDuration(2.0f);
        parallel.AddAction(delay);

        //
        actionManager.RunAction(parallel);
        //action.animator = bat
    }
コード例 #3
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
    }