/// <summary>Called when the lobby scene from Unity is loaded.</summary> /// <param name="lvl">Id of the level loaded.</param> /// <returns>void</returns> public override void onLevelWasLoaded(int lvl) { base.onLevelWasLoaded(lvl); player_ = GameObject.FindGameObjectWithTag("Player"); playerScript_ = player_.GetComponent <FirstPersonController>(); scoreManager = GameObject.FindGameObjectWithTag("ScoreManager").GetComponent <MarioScoreManager>(); spawner = GameObject.FindGameObjectWithTag("Spawner").GetComponent <MarioSpawner>(); if (Application.isMobilePlatform) { Screen.orientation = ScreenOrientation.Landscape; } setParameter(new Parameter()); }
void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } marios = new GameObject[marioPrefabs.Length]; for (int i = 0; i < marioPrefabs.Length; i++) { marios[i] = Instantiate(marioPrefabs[i], transform.position, Quaternion.identity, this.transform); marios[i].SetActive(false); } }
// Use this for initialization void Start() { spawner = GameObject.Find("Spawner").GetComponent <MarioSpawner>(); //pauseMenu = GameObject.Find ("Pause"); }
void Start() { marioSpawnerComponent = marioSpawner.GetComponent <MarioSpawner>(); }