IEnumerator CheckForUIElement() { while (bactUI == null) { bactUI = GetComponent <BacteriaUI>(); yield return(null); } }
// Use this for initialization protected override void Start() { base.Start(); m_rigidbody = GetComponent <Rigidbody2D> (); bactUI = GetComponent <BacteriaUI> (); ai = GetComponent <ImprovedBacteriaAI>(); }