Exemple #1
0
    /// <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());
    }
Exemple #2
0
 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);
     }
 }
Exemple #3
0
    // Use this for initialization
    void Start()
    {
        spawner = GameObject.Find("Spawner").GetComponent <MarioSpawner>();

        //pauseMenu = GameObject.Find ("Pause");
    }
Exemple #4
0
 void Start()
 {
     marioSpawnerComponent = marioSpawner.GetComponent <MarioSpawner>();
 }