// Use this for initialization void Start() { gm = GameObject.FindGameObjectWithTag ("AsteroidGameManager").GetComponent<AsteroidGameManager> (); player = GameObject.FindGameObjectWithTag ("Player").GetComponent<AsteroidPlayerShip> (); asteroidScore = GameObject.FindGameObjectWithTag ("AsteroidScore").GetComponent<AsteroidScore> (); // stats = GameObject.FindGameObjectWithTag ("AsteroidGameManager").GetComponent<Stats> (); }
// Use this for initialization void Start() { startscreen = GameObject.Find ("startscreen").GetComponent<SpriteRenderer> (); startGameObject = GameObject.Find ("startscreen"); // Spawn "i" - number of asteroids at the start of game. for (int i = 0 ; i < startingAsteroids ; ++i) { SpawnAsteroid(); SpawnArtifact(); } asteroidScore = GameObject.FindGameObjectWithTag ("AsteroidScore").GetComponent<AsteroidScore> (); player = GameObject.FindGameObjectWithTag ("Player").GetComponent<AsteroidPlayerShip> (); }
// Use this for initialization void Start() { gm = GameObject.FindGameObjectWithTag ("AsteroidGameManager").GetComponent<AsteroidGameManager> (); player = GameObject.FindGameObjectWithTag ("Player").GetComponent<AsteroidPlayerShip> (); }