Пример #1
0
 // Use this for initialization
 void Start()
 {
     agent = GetComponentInChildren<NavMeshAgent> ();
     seeker = GetComponent<TargetSeek> ();
     anim = GetComponent<Animator> ();
     controller = GetComponent<ORCAController> ();
     controllerPower = controller.power;
 }
Пример #2
0
 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;
 }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     seeker = GetComponent<TargetSeek>();
     stats = GetComponentInParent<UnitStats>();
     currentBarrel = 0;
 }
Пример #4
0
 // Use this for initialization
 void Start()
 {
     agent = GetComponentInChildren<NavMeshAgent>();
     seeker = GetComponent<TargetSeek>();
 }
Пример #5
0
 // Use this for initialization
 void Start()
 {
     correct = 1/Time.fixedDeltaTime;
     seeker = GetComponent<TargetSeek>();
     stats = GetComponentInParent<UnitStats>();
     currentBarrel = 0;
 }