//----- public HGenericStateFSM(string _stateName, int _stateId, GameObject _gameo, int _hLevel, bool _finalHLevel, HGenericStateFSM _fatherState, AIAgent1 _scriptAIAgent) { stateName = _stateName; stateId = _stateId; gameObject = _gameo; myHLevel = _hLevel; finalHLevel = _finalHLevel; if (_fatherState == null) { fatherState = _fatherState; } agentScript = _scriptAIAgent; myHInitialize += initializeHState; myHUpdate += updateHState; myHFinalize += finalizeHState; myHTransition += checkHierarchyTransitions; myHHandleCollisionEnter += handleHEnCollision; myHHandleTriggerEnter += handleHEnTrigger; }
public HStateFSM(string _stateName, int _stateId, GameObject _gameo, int _hLevel, bool _finalHLevel, HStateFSM _fatherState, AIAgent1 _scriptAIAgent) { //GameObject gameo = this.gameObject; stateName = _stateName; stateId = _stateId; gameObject = _gameo; myHLevel = _hLevel; finalHLevel = _finalHLevel; if (_fatherState == null) { fatherState = _fatherState; } //TODO : ? //agentScript = gameObject.GetComponent<AIAgent1> (); agentScript = _scriptAIAgent; playerScript = gameObject.GetComponent <PlayerMovements> (); if (playerScript == null) { #if _WARNING_DEBUG Debug.Log("ATTENZIONE - script PlayerMovements non trovato"); #endif } par = gameObject.GetComponent <AIParameters> (); if (par == null) { #if _WARNING_DEBUG Debug.Log("ATTENZIONE - script AIParameters non trovato"); #endif } statusPar = par.statusParameters; myHInitialize += initializeHState; myHUpdate += updateHState; myHFinalize += finalizeHState; myHTransition += checkHierarchyTransitions; myHHandleCollisionEnter += handleHEnCollision; myHHandleTriggerEnter += handleHEnTrigger; //agentScript.statesMap.addState (this); }
public HPatrol1FSM(string _stateName, GameObject _gameo, int _hLevel, AIAgent1 _scriptAIAgent) : base(_stateName, 0, _gameo, _hLevel, false, null, _scriptAIAgent) { finalHLevel = false; if (!getStatusSpriteRenderer(ref statusSpriteRend)) { Debug.Log("ATTENZIONE - spriterenderer di StatusImg non trovato"); } initializePatrolParameters(); }
public HChase1FSM(string _stateName, GameObject _gameo, int _hLevel, AIAgent1 _scriptAIAgent) : base(_stateName, 0, _gameo, _hLevel, false, null, _scriptAIAgent) { finalHLevel = false; initializeChaseParameters(); myFinalize += finalizeChase; if (!getStatusSpriteRenderer(ref statusSpriteRend)) { Debug.Log("ATTENZIONE - spriterenderer di StatusImg non trovato"); } //myHandleCollisionEnter }
public HWanderFSM(int _stateId, GameObject _gameo, int _hLevel, HEnemyStateFSM _fatherState, AIAgent1 _scriptAIAgent, bool _flipControl = false) : base("Wander", _stateId, _gameo, _hLevel, true, _fatherState, _scriptAIAgent) { myInitialize += wanderInitialize; flipControl = _flipControl; myUpdate += wanderUpdate; myHandleCollisionEnter += checkFlipNeedForCollision; myHandleCollisionEnter += checkKillPlayerCollision; initializeWanderParameters(); //wanderInitialize (); }
public HCrashChaseFSM(GameObject _gameo, int _hLevel, HEnemyStateFSM _fatherState, AIAgent1 _scriptAIAgent) : base("CrashChase", _gameo, _hLevel, _scriptAIAgent) { finalHLevel = true; fatherState = _fatherState; myInitialize += initializeCrashChase; myUpdate += updateCrashChase; myFinalize += finalizeCrashChase; myHandleCollisionEnter += checkCrashWallCollision; }
public HChargeChaseFSM(GameObject _gameo, int _hLevel, HEnemyStateFSM _fatherState, AIAgent1 _scriptAIAgent) : base("ChargeChase", _gameo, _hLevel, _scriptAIAgent) { finalHLevel = true; fatherState = _fatherState; myInitialize += initializeChargeChase; myFinalize += finalizeChargeChase; }
public HStandPatrolFSM(GameObject _gameo, int _hLevel, HEnemyStateFSM _fatherState, AIAgent1 _scriptAIAgent) : base("StandPatrol", _gameo, _hLevel, _scriptAIAgent) { finalHLevel = true; fatherState = _fatherState; myUpdate += updatePatrolStand; }
public HWalkPatrolFSM(GameObject _gameo, int _hLevel, HEnemyStateFSM _fatherState, AIAgent1 _scriptAIAgent) : base("WalkPatrol", _gameo, _hLevel, _scriptAIAgent) { myHandleCollisionEnter += checkFlipNeedForCollision; finalHLevel = true; fatherState = _fatherState; myUpdate += updatePatrolWalk; myInitialize += initializeWalkPatrol; myFinalize += finalizeWalkPatrol; }
//CONSTRUCTOR---------------------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------------------------------- public HChaseFSM(int _stateId, GameObject _gameo, int _hLevel, HEnemyStateFSM _fatherState, AIAgent1 _scriptAIAgent) : base("Chase", _stateId, _gameo, _hLevel, true, _fatherState, _scriptAIAgent) { myInitialize += initializeChase; myUpdate += updateChase; myFinalize += finalizeChase; initializeChaseParameters(); }
public HEnemyStateFSM(string _stateName, GameObject _gameo, bool _finalHLevel, HGenericStateFSM _fatherState, AIAgent1 _scriptAIAgent) : base(_stateName, _gameo, _finalHLevel, _fatherState, _scriptAIAgent) { playerScript = gameObject.GetComponent <PlayerMovements> (); if (playerScript == null) { #if _WARNING_DEBUG Debug.Log("ATTENZIONE - script PlayerMovements non trovato"); #endif } par = gameObject.GetComponent <AIParameters> (); if (par == null) { #if _WARNING_DEBUG Debug.Log("ATTENZIONE - script AIParameters non trovato"); #endif } statusPar = par.statusParameters; }
public HFinalChildFSM(string _stateName, GameObject _gameo, int _hLevel, HStateFSM _fatherState, AIAgent1 _scriptAIAgent) : base(_stateName, _gameo, _hLevel, _scriptAIAgent) { }
/* * public GameObject []patrolPoints; * //verso di default dove puntare lo sguardo nel caso di un singolo punto di patrol * public bool DefaultVerseRight = true; * * //nuova gestione suspicious * bool firstCheckDone_Suspicious = false; * public float tSearchLenght = 2.5f; * bool standingSusp = false; * bool exitSuspicious = false; * * //variabili da resettare ad inizio stato * bool patrollingTowardAPoint = false; * Transform patrolTarget;//utile dichiararlo momentaneamente public per vedere che valore ha * * //public float DEFAULT_DUMB_SPEED = 2.0f; * * //Gestione raycast target------------------------------------ * //public LayerMask targetLayers; dichiarata su * float frontalDistanceOfView = 5.0f; * float scale_FrontalDistanceOfView_ToBeFar = 1.5f; * float backDistanceOfView = 2.0f; * */ //CONSTRUCTOR---------------------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------------------------------- public HPatrolFSM(int _stateId, GameObject _gameo, int _hLevel, HEnemyStateFSM _fatherState, AIAgent1 _scriptAIAgent, patrolSubState patrolT) : base("Patrol", _stateId, _gameo, _hLevel, true, _fatherState, _scriptAIAgent) { myInitialize += patrolInitialize; switch (patrolT) { case patrolSubState.Walk: myUpdate += updatePatrolWalk; myHandleCollisionEnter += checkFlipNeedForCollision; break; case patrolSubState.Area: myUpdate += updatePatrolArea; break; case patrolSubState.Stand: myUpdate += updatePatrolStand; break; } myFinalize += patrolFinalize; myHandleCollisionEnter += checkKillPlayerCollision; initializePatrolParameters(); }
public HFleeFSM(int _stateId, GameObject _gameo, int _hLevel, HEnemyStateFSM _fatherState, AIAgent1 _scriptAIAgent) : base("Flee", _stateId, _gameo, _hLevel, true, _fatherState, _scriptAIAgent) { myInitialize += fleeInitialize; myUpdate += fleeUpdate; myHandleCollisionEnter += checkFlipNeedForCollision; }
public HFiglio1FSM(string _stateName, GameObject _gameo, int _hLevel, HGenericStateFSM _fatherState, AIAgent1 _scriptAIAgent) : base(_stateName, _gameo, _hLevel, _scriptAIAgent) { finalHLevel = true; fatherState = _fatherState; myInitialize += initFiglio; myUpdate += updateFiglio; }
public HSuspPatrolFSM(GameObject _gameo, int _hLevel, HEnemyStateFSM _fatherState, AIAgent1 _scriptAIAgent) : base("SuspPatrol", _gameo, _hLevel, _scriptAIAgent) { finalHLevel = true; fatherState = _fatherState; myInitialize += initializeSuspPatrol; myFinalize += finalizeSuspPatrol; myUpdate += updateSuspPatrol; }
public HPadreFSM(string _stateName, GameObject _gameo, int _hLevel, AIAgent1 _scriptAIAgent) : base(_stateName, 0, _gameo, _hLevel, false, null, _scriptAIAgent) { finalHLevel = false; myInitialize += initPadre; }
public HStunnedFSM(int _stateId, GameObject _gameo, int _hLevel, HEnemyStateFSM _fatherState, AIAgent1 _scriptAIAgent, bool _killingState = true) : base("Stunned", _stateId, _gameo, _hLevel, true, _fatherState, _scriptAIAgent) { //killingState = _killingState; if (!_killingState) { myInitialize += normalStunnedInitialize; } else { myInitialize += killingStunnedInitialize; } myUpdate += stunnedUpdate; myFinalize += stunnedFinalize; initializeStunnedParameters(); }