Exemplo n.º 1
0
    void Start()
    {
        //take the current position= new positiont(0,0,0)
        transform.position = new Vector3(0, 0, 0);
        _spawnManger       = GameObject.Find("SpawnManger").GetComponent <SpawnManger>();
        _uiManager         = GameObject.Find("Canvas").GetComponent <UIManager>();
        if (_spawnManger == null)
        {
            UnityEngine.Debug.LogError("The Spawn Manger is Null");
        }

        if (_uiManager == null)
        {
            UnityEngine.Debug.LogError("The UI Manger is Null");
        }
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != null)
     {
         Destroy(gameObject);
     }
     wall     = GetComponent <SpawnManger>();
     queen    = GetComponent <SpawnManger>();
     alien    = GetComponent <SpawnManger>();
     terrain  = GetComponent <SpawnManger>();
     boundary = GetComponent <SpawnManger>();
     InitGame();
 }
Exemplo n.º 3
0
 private void Start()
 {
     _spawnMamger = GameObject.Find("SpawnManger").GetComponent <SpawnManger>();
 }
Exemplo n.º 4
0
 public void Awake()
 {
     Instance = this;
 }
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     spawner = GetComponent<SpawnManger>();
     spawner.StartSpawner();
 }