public ChasingState(F_TankController NPC) { stateID = StateID.Chasing; myController = NPC; mySensor = myController.GetComponentInChildren<F_PasiveSensor>(); myNav = myController.GetComponent<NavMeshAgent>(); myTargetting = myController.GetComponent<F_Targetting>(); }
public PatrollingState(F_TankController NPC) { myController = NPC; patrolWaypoints = myController.patrolWaypoints; stateID = StateID.Patroling; mySensor = myController.GetComponentInChildren<F_PasiveSensor>(); myNav = myController.GetComponent<NavMeshAgent>(); myControlMode = myController.GetComponent<F_ControlMode>(); }
public DestroyedState(F_TankController NPC) { stateID = StateID.Destroyed; myController = NPC; mySensor = myController.GetComponentInChildren<F_PasiveSensor>(); myNav = myController.GetComponent<NavMeshAgent>(); myTargetting = myController.GetComponent<F_Targetting>(); myAttack = myController.GetComponent<TankMinionAttack>(); myStats = myController.GetComponent<F_Stats>(); myControlMode = myController.GetComponent<F_ControlMode>(); }