public void Setup(MecanimManager manager, VisualObject owner)
    {
        if (manager == null || manager.Anim == null || manager.Anim.runtimeAnimatorController == null)
        {
            return;
        }
        //初始化
        mAnimManager = manager;
        mOwner       = owner;
        VisualAnimFSM vfsm = new VisualAnimFSM(mAnimManager, mOwner);

        vfsm.Initialize();
        vfsm.Activate();

        MoveAnimFSM mfsm = new MoveAnimFSM(mAnimManager, mOwner);

        mfsm.Initialize();
        mfsm.Activate();


        HurtAnimFSM hfsm = new HurtAnimFSM(mAnimManager, mOwner);

        hfsm.Initialize();
        hfsm.Activate();

        mAnimStates = new AnimFSM[] { vfsm, mfsm, hfsm };

        mHasSetup = true;
    }
Beispiel #2
0
 public AnimState(MecanimManager anims, VisualObject owner)
 {
     mAnimator = anims;
     Owner     = owner;
 }
 public AnimStateUseSkill(MecanimManager anims, VisualObject owner)
     : base(anims, owner)
 {
 }
Beispiel #4
0
 public AnimStateIdle(MecanimManager anims, VisualObject owner)
     : base(anims, owner)
 {
 }
Beispiel #5
0
 public MoveAnimFSM(MecanimManager anims, VisualObject owner)
     : base(anims, owner)
 {
 }
Beispiel #6
0
 public AnimStateHurt(MecanimManager anims, VisualObject owner)
     : base(anims, owner)
 {
     //hurthash = Animator.StringToHash("hurt");
 }
Beispiel #7
0
 public AnimFSM(MecanimManager anims, VisualObject owner)
 {
     AnimEngine = anims;
     Owner      = owner;
 }