Example #1
0
    // Use this for initialization
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }
        if (GameManager.instance == null)
        {
            Instantiate(gameManager);
        }

        cor          = Random.Range(0, 3);
        fundo.sprite = Fundos [cor];

        powerup.Start();
        suga.Start();
        atraso.Start();
        info.Start();
        checkpoint.Start();

        SoundManager.instance.PlayMusic(musicaMenu);
        BuscarFases();
    }