Ejemplo n.º 1
0
    void Start()
    {
        f = GameObject.FindGameObjectWithTag("Fade").GetComponent <Fade1>();
        m = GameObject.FindGameObjectWithTag("Manager").GetComponent <Manager>();
        Debug.Log("Start Between Scenes  " + f.i + " " + m.score);

        if (m.score == 10)
        {//tu może być też ładniejszy obrazek...
            m.LevelText.text = "Congratulations! Level 1 Complete\n\t\t\t Start Next Level?";
        }
        else if (m.score == 39)
        {
            m.LevelText.text = "Congratulations! Level 2 Complete\n\t\t\t Start Next Level?";
        }
        else if (m.score == 84)
        {
            m.LevelText.text = "Congratulations! Level 3 Complete\n\t\t\t Start Next Level?";
        }
        else if (m.score == 188)
        {
            m.LevelText.text = "Congratulations! Level 4 Complete\n\t\t\t Start Next Level?";
        }
        else if (m.score == 262)
        {
            m.LevelText.text = "\t\t\t\t\t\tTHE END\n\t\t\t  CONGRATULATIONS!";
        }
    }
Ejemplo n.º 2
0
    void Start()
    {
        if (Application.loadedLevel != 0 && Application.loadedLevel != 2)
        {
            ps = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerScript>();
            if (Application.loadedLevel > 7 && Application.loadedLevel != 9)
            {
                ps2 = GameObject.FindGameObjectWithTag("Player2").GetComponent <Player2Script>();
            }
        }


        if (Application.loadedLevel != 2)
        {
            switchS = false;
        }

        f = GameObject.FindGameObjectWithTag("Fade").GetComponent <Fade1>();


        if (PlayerPrefs.HasKey("HighscoreSurvival"))
        {
            highScoreSurvival = PlayerPrefs.GetInt("HighscoreSurvival");
        }


        if (PlayerPrefs.HasKey("Score"))
        {
            if (Application.loadedLevel == 0)
            {
                PlayerPrefs.DeleteKey("Score");
                score = 0;
            }
            else
            {
                score = PlayerPrefs.GetInt("Score");
            }
        }

        if (PlayerPrefs.HasKey("Score2"))
        {
            if (Application.loadedLevel == 0)
            {
                PlayerPrefs.DeleteKey("Score2");
                score2 = 0;
            }
            else
            {
                score2 = PlayerPrefs.GetInt("Score2");
            }
        }

        if (PlayerPrefs.HasKey("Highscore"))
        {
            highScore = PlayerPrefs.GetInt("Highscore");
        }
    }
Ejemplo n.º 3
0
 void Start()
 {
     f = GameObject.FindGameObjectWithTag("Fade").GetComponent <Fade1>();
     m = GameObject.FindGameObjectWithTag("Manager").GetComponent <Manager>();
     //mode = GameObject.FindGameObjectWithTag("Mode");
 }