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; }
public AnimState(MecanimManager anims, VisualObject owner) { mAnimator = anims; Owner = owner; }
public AnimStateUseSkill(MecanimManager anims, VisualObject owner) : base(anims, owner) { }
public AnimStateIdle(MecanimManager anims, VisualObject owner) : base(anims, owner) { }
public MoveAnimFSM(MecanimManager anims, VisualObject owner) : base(anims, owner) { }
public AnimStateHurt(MecanimManager anims, VisualObject owner) : base(anims, owner) { //hurthash = Animator.StringToHash("hurt"); }
public AnimFSM(MecanimManager anims, VisualObject owner) { AnimEngine = anims; Owner = owner; }