// Use this for initialization void Start() { finder = gameObject.GetComponent<SeePlayer>(); if(finder != null) finder.isAlternateAngle = true; }
// Use this for initialization void Start() { finder = gameObject.GetComponent <SeePlayer>(); if (finder != null) { finder.isAlternateAngle = true; } }
// Use this for initialization void Start() { //Create reference to nav agent component navAgent = transform.GetComponent <UnityEngine.AI.NavMeshAgent> (); //Position will be set using grid move navAgent.updatePosition = false; string[] currentMove = movements [step].Split(','); if (currentMove [0] == "w") { waitTime = Time.fixedTime + float.Parse(currentMove [1]); step++; if (step >= movements.Length) { step = 0; } } //Do not put two waits in a row currentMove = movements [step].Split(','); dest = new Vector3(float.Parse(currentMove [0]), 0.0f, float.Parse(currentMove [1])); step++; viewer = gameObject.GetComponent <SeePlayer> (); }
void Start() { pos_initiale = transform.localPosition; script_enemy = this.GetComponent <Enemy> (); script_see = this.GetComponent <SeePlayer> (); }
// Use this for initialization void Start() { finder = gameObject.GetComponent<SeePlayer>(); }
// Use this for initialization void Start() { finder = gameObject.GetComponent <SeePlayer>(); }