public void Start() { at = GetComponent <AttackTransmitter> (); //because we're an enemy, add to enemy list GameData.enemies.Add(transform); if (target != null) { StartCoroutine("ChaseTarget"); StartCoroutine("ShootTarget"); } }
void Awake() { ri = GetComponent <RigidbodyInterface>(); billboard = GetComponentInChildren <Floater> (); damageInput = GetComponentInChildren <DamageInput> (); if (attackTransmitter == null) { attackTransmitter = GetComponentInChildren <AttackTransmitter> (); } damageInput.SetUp(this); attackTransmitter.SetUp(this); }