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>(); }
// private Transform closestWaypoint; public StartPatrolState(F_TankController NPC) { stateID = StateID.StartPatrol; patrolWaypoints = NPC.patrolWaypoints; myController = NPC; myNav = NPC.GetComponent<NavMeshAgent>(); myControlMode = NPC.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>(); }