// Use this for initialization void Start() { anim = GetComponent <Animator> (); player = GetComponent <Rigidbody> (); sword = GameObject.Find("Sword").GetComponent <Sword> (); stage = GameObject.Find("Manager").GetComponent <StageManager> (); roshan = GameObject.Find("Roshan").GetComponent <AIBoss> (); mAudio = this.GetComponent <AudioSource> (); mAudio.clip = Walk; mAudio.loop = true; mAudio.playOnAwake = false; mAudio2 = gameObject.AddComponent <AudioSource> (); mAudio2.loop = false; mAudio.playOnAwake = false; }
void Start() { anim = GetComponentInParent <Animator> (); roshan = GameObject.Find("Roshan").GetComponent <AIBoss>(); }
// Use this for initialization void Start() { temp = GetComponent <RectTransform> ().localScale.x; roshan = GameObject.Find("Roshan").GetComponent <AIBoss>(); }