//----------------------------------------------------------------------------------------------------------------------------------------- IEnumerator LoadReferences() { Debug.Log("Looking for references"); while(!initialized) { if (!_towerCursor) _towerCursor = TowerCursor.GetInstance(); if (!_towerRays) _towerRays = TowerRays.GetInstance(); if (_towerCursor && _towerRays) initialized = true; yield return null; } Debug.Log("references loaded for tower"); }
//----------------------------------------------------------------------------------------------------------------------------------------- // Use this for initialization void Start () { instance = this; canShot = true; }