// Use this for initialization void Start() { agent = GetComponentInChildren<NavMeshAgent> (); seeker = GetComponent<TargetSeek> (); anim = GetComponent<Animator> (); controller = GetComponent<ORCAController> (); controllerPower = controller.power; }
public void SetupStateSet(Vector3 pointDown, Vector3 pointDeploy, Vector3 pointMarch, GameObject enemySF) { agent = GetComponentInChildren<NavMeshAgent>(); targetSeeker = GetComponent<TargetSeek>(); stateSet = new StateSet(); //Debug.Log(pointDown); stateSet.down = new StateDown(agent, pointDown, transform, ref stateSet); stateSet.deploy = new StateDeploy(agent, pointDeploy, transform, ref stateSet); stateSet.marsh = new StateMarsh(agent, pointMarch, transform, ref stateSet); stateSet.assault = new StateAssault(agent, enemySF.transform.position, transform, ref stateSet); stateSet.agro = new StateAgro(agent, enemySF.transform.position, transform, ref stateSet); stateSet.agro.optimalDistance = optimalDistance; stateSet.agro.chaseDistance = chaseDistance; stateSet.agro.fearDistance = fearDistance; stateSet.currentState = stateSet.down; }
// Use this for initialization void Start() { seeker = GetComponent<TargetSeek>(); stats = GetComponentInParent<UnitStats>(); currentBarrel = 0; }
// Use this for initialization void Start() { agent = GetComponentInChildren<NavMeshAgent>(); seeker = GetComponent<TargetSeek>(); }
// Use this for initialization void Start() { correct = 1/Time.fixedDeltaTime; seeker = GetComponent<TargetSeek>(); stats = GetComponentInParent<UnitStats>(); currentBarrel = 0; }