public void setDefaultTransitions(HStunnedFSM stunState, HChase1FSM chaseState) { addTransition(P2ScheckStunned, stunState); addTransition(P2CcheckChaseTarget, chaseState); addTransition(Any2KScheckInstantKill, stunState); }
public void setDefaultTransitions(HStunnedFSM stunState, HPatrolFSM patrolState) { //addTransition (C2ScheckStunned, "Stunned"); addTransition(C2ScheckStunned, stunState); //addTransition (C2PlostTarget, "Patrol"); addTransition(C2PlostTarget, patrolState); //addTransition( stun) }
public void setDefaultTransitions(HStunnedFSM stunState, HChaseFSM chaseState) { //addTransition (P2FcheckDanger, "Flee"); //addTransition (P2CcheckChaseTarget, "Chase"); //addTransition (P2ScheckStunned, "Stunned"); addTransition(P2ScheckStunned, stunState); //addTransition (P2CcheckChaseTarget, "Chase"); addTransition(P2CcheckChaseTarget, chaseState); }
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); }
protected override void initializeHStates() { //Time.timeScale = 0.3f; HPatrolFSM hp = new HPatrolFSM(0, this.gameObject, 0, null, this, patrolType); HStunnedFSM hs = new HStunnedFSM(1, this.gameObject, 0, null, this, false); //(string _stateName, GameObject _gameo, int _hLevel, AIAgent1 _scriptAIAgent) HChase1FSM hc = new HChase1FSM("Chase", this.gameObject, 0, this); HChargeChaseFSM hcc1 = new HChargeChaseFSM(this.gameObject, 1, hc, this); HCrashChaseFSM hcc2 = new HCrashChaseFSM(this.gameObject, 1, hc, this); addState(hp); addState(hs); addState(hc); hc.setDefaultStates(hcc1, hcc2); //hc.addState (hcc1); //hc.addState (hcc2); //hpadre.addState (hfiglio1); //hpadre.addState (hfiglio2); //------ setActiveState(hp); hp.setDefaultTransitions(hs, hc); hs.setDefaultTransitions(hp); hc.setDefaultInitialize(); hc.setDefaultTransitions(hs, hp); hc.setDefaultCollision(); hcc1.setDefaultTransitions(hcc2); hcc2.setDefaultTransitions(hs, null); }
//initializeHStates (); //setStartState (); //initializeConditions (); protected override void initializeHStates() { HPatrolFSM hp = new HPatrolFSM(0, this.gameObject, 0, null, this, HPatrolFSM.patrolSubState.Walk); HStunnedFSM hs = new HStunnedFSM(1, this.gameObject, 0, null, this, false); HChaseFSM hc = new HChaseFSM(2, this.gameObject, 0, null, this); addState(hp); addState(hs); addState(hc); //------ setActiveState(hp); hp.setDefaultTransitions(hs, hc); hs.setDefaultTransitions(hp); hc.setDefaultTransitions(hs, hp); }
protected override void initializeHStates() { //Time.timeScale = 0.3f; //HPatrolFSM hp = new HPatrolFSM (0, this.gameObject, 0, null, this, patrolType); aiParam = GetComponent <AIParameters> (); HPatrol1FSM hP = new HPatrol1FSM("Patrol", this.gameObject, 0, this); HSuspPatrolFSM hps = new HSuspPatrolFSM(this.gameObject, 1, hP, this); HWalkPatrolFSM hpw = new HWalkPatrolFSM(this.gameObject, 1, hP, this); HPatrol1FSM defaultChildPatrol = null; switch (patrolType) { case PatrolType.Walk: defaultChildPatrol = hpw; break; case PatrolType.Area: HAreaPatrolFSM hpa = new HAreaPatrolFSM(this.gameObject, 1, hP, this); defaultChildPatrol = hpa; break; case PatrolType.Stand: HStandPatrolFSM hpst = new HStandPatrolFSM(this.gameObject, 1, hP, this); defaultChildPatrol = hpst; break; default: break; } HStunnedFSM hs = new HStunnedFSM(1, this.gameObject, 0, null, this, false); HChase1FSM hc = new HChase1FSM("Chase", this.gameObject, 0, this); HChargeChaseFSM hcc1 = new HChargeChaseFSM(this.gameObject, 1, hc, this); HCrashChaseFSM hcc2 = new HCrashChaseFSM(this.gameObject, 1, hc, this); addState(hP); addState(hs); addState(hc); //patrol hP.setDefaultStates(hps, defaultChildPatrol, hpw); hP.setDefaultTransitions(hs, hc); hP.setDefaultDelegates(); switch (patrolType) { case PatrolType.Walk: break; case PatrolType.Area: ((HAreaPatrolFSM)defaultChildPatrol).setDefaultTransitions(hpw); break; case PatrolType.Stand: ((HStandPatrolFSM)defaultChildPatrol).setDefaultTransitions(hpw); break; default: break; } hps.setDefaultTransitions(defaultChildPatrol); setActiveState(hP); //chase //TODO: da restringere ad una chiamata : - states - delegates - transitions - collision hc.setDefaultStates(hcc1, hcc2); hc.setDefaultInitialize(); hc.setDefaultTransitions(hs, hP); hc.setDefaultCollision(); hcc1.setDefaultTransitions(hcc2); hcc2.setDefaultTransitions(hs, hP); //stun hs.setDefaultTransitions(hP); }
public void setDefaultTransitions(HStunnedFSM stunState) { //addTransition (W2ScheckStunned, "Stunned"); addTransition(W2ScheckStunned, stunState); addTransition(Any2KScheckInstantKill, stunState); }
public void setDefaultTransitions(HStunnedFSM hstunn, HPatrol1FSM hpatrol) { addTransition(CC2ScheckWallStun, hstunn); addTransition(CC2PcheckNotInFrontTarget, hpatrol); }
public void setDefaultTransitions(HStunnedFSM hstun, HPatrol1FSM hpatrol) { addTransition(C2ScheckStun, hstun); addTransition(C2PlostTargetNull, hpatrol); addTransition(Any2KScheckInstantKill, hstun); }
public void setDefaultTransitions(HStunnedFSM stunState) { //addTransition (F2ScheckStunned, "Stunned"); addTransition(F2ScheckStunned, stunState); }