// Use this for initialization void Start() { AI = (GameObject)Resources.Load ("newPatron"); mom = (GameObject)Resources.Load("Mom"); dad = (GameObject)Resources.Load("Dad"); spawn = GameObject.Find("AI_spawn_point"+identifier+"").GetComponent<Transform>().position; sg = GameObject.Find("MetaSpawn").GetComponent<spawnGlobal>(); }
//int stopHeadHash; // Use this for initialization void Start() { anim = GetComponent<Animator> (); spawn = GameObject.Find("MetaSpawn").GetComponent<spawnGlobal>(); headHash = Animator.StringToHash("tossHead"); deathLight = gameObject.GetComponentInChildren<Light>(); deathLight.enabled = false; //stopHeadHash = Animator.StringToHash("stopHead"); }
// Use this for initialization void Start() { //spawnController = GameObject.Find("AI_spawn_point").GetComponent<spawnAI>(); agent = GetComponent<NavMeshAgent>(); //target = GameObject.Find("AINode9").GetComponent<Transform>().position; anim = GetComponent<Animator> (); Image[] bars = GetComponentsInChildren<Image>(); foreach (Image i in bars) { if (i.gameObject.name == "Health") { healthBar = i; } } sg = GameObject.Find("MetaSpawn").GetComponent<spawnGlobal>(); viewTarget = point0; idle = true; state = 0; active = true; health = maxHealth; isDead = false; scaredNow = false; dying = false; anim.SetBool ("Walk", true); deathTimer = 0; agent.avoidancePriority = Random.Range(1, 100); setSpawnTag(); }