void Awake() { Stats = GetComponentInParent <EnemyStat>(); anim = gameObject.GetComponentInParent <Animator>(); Mov = gameObject.GetComponentInParent <RangedEnemyMovement>(); tempattspeed = Stats.AttackSpeed; Stats.AttackSpeed = 0; Spawn(); //Debug.Log (anim.name); }
void Awake() { gunLight = GetComponent <Light> (); gunParticles = GetComponent <ParticleSystem> (); gunAudio = GetComponent <AudioSource> (); Stats = GetComponentInParent <EnemyStat>(); anim = gameObject.GetComponentInParent <Animator>(); Mov = gameObject.GetComponentInParent <RangedEnemyMovement>(); tempattspeed = Stats.AttackSpeed; Stats.AttackSpeed = 0; //Debug.Log (anim.name); }