public void setDefaultTransitions(HWanderFSM wanderState) { //addTransition (S2PcountDownStunned, "Wander"); addTransition(S2PcountDownStunned, wanderState); /* * if (!killingState) { * * addTransition (S2PcountDownStunned, "Patrol"); * * Debug.Log ("trans messa"); * } * else { * * addTransition (S2PcountDownStunned, "Wander"); * * } */ }
protected override void initializeHStates() { aiParam = GetComponent <AIParameters> (); HWanderFSM hw = new HWanderFSM(0, this.gameObject, 0, null, this, flipControl); HStunnedFSM hs = new HStunnedFSM(1, this.gameObject, 0, null, this); addState(hw); addState(hs); //------- setActiveState(hw); hw.setDefaultTransitions(hs); hs.setDefaultTransitions(hw); }