示例#1
0
 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");
     }
 }
示例#2
0
 void Awake()
 {
     ri          = GetComponent <RigidbodyInterface>();
     billboard   = GetComponentInChildren <Floater> ();
     damageInput = GetComponentInChildren <DamageInput> ();
     if (attackTransmitter == null)
     {
         attackTransmitter = GetComponentInChildren <AttackTransmitter> ();
     }
     damageInput.SetUp(this);
     attackTransmitter.SetUp(this);
 }