Beispiel #1
0
    public void StartGame(bool singleplayer, string singleplayerSavePath, ConnectData connectData)
    {
        ScreenGame screenGame = new ScreenGame();

        screenGame.menu = this;
        screenGame.Start(p, singleplayer, singleplayerSavePath, connectData);
        screen = screenGame;
    }
Beispiel #2
0
    public void StartGame(bool singleplayer, string singleplayerSavePath, ConnectData connectData)
    {
        ScreenGame screenGame = new ScreenGame();

        screenGame.menu = this;
        screenGame.Start(p, singleplayer, singleplayerSavePath, connectData);
        p.MouseCursorSetVisible(false);
        screen = screenGame;
    }
Beispiel #3
0
 public void StartGame(bool singleplayer, string singleplayerSavePath, ConnectData connectData)
 {
     ScreenGame screenGame = new ScreenGame();
     screenGame.menu = this;
     screenGame.Start(p, singleplayer, singleplayerSavePath, connectData);
     screen = screenGame;
 }
    void GUILevel(int level)
    {
        levelRect.Set(guiRect.x, guiRect.y, guiRect.width, guiRect.height);

        if (GUI.Button(levelRect, "", "Text"))
        {
            if (level <= MySettings.unlockedLeves)
            {
                AudioController.Instance.Play(AudioController.SoundType.Good);

                Destroy(this.gameObject);

                ScreenGame sc = (Instantiate(screenGame) as GameObject).transform.GetComponent <ScreenGame>();
                sc.level = level;
            }
            else
            {
                AudioController.Instance.Play(AudioController.SoundType.Bad);
            }
        }

        GUI.DrawTexture(levelRect, levelBg);

        levelRect.Set(guiRect.x + (guiRect.width - numbers[level - 1].width) * 0.5f, guiRect.y + (guiRect.height - numbers[level - 1].height) * 0.5f, numbers[level - 1].width, numbers[level - 1].height);
        GUI.DrawTexture(levelRect, numbers[level - 1]);

        levelRect.Set(guiRect.x - 15, guiRect.y - 15, fullStar.width, fullStar.height);
        GUI.DrawTexture(levelRect, emptyStars);

        levelRect.Set(guiRect.x + 37, guiRect.y - 30, fullStar.width, fullStar.height);
        GUI.DrawTexture(levelRect, emptyStars);

        levelRect.Set(guiRect.x + 90, guiRect.y - 17, fullStar.width, fullStar.height);
        GUI.DrawTexture(levelRect, emptyStars);

        if (ratingLevels.ContainsKey(level))
        {
            if (ratingLevels[level] >= 1)
            {
                levelRect.Set(guiRect.x - 15, guiRect.y - 15, fullStar.width, fullStar.height);
                GUI.DrawTexture(levelRect, fullStar);
            }

            if (ratingLevels[level] >= 2)
            {
                levelRect.Set(guiRect.x + 37, guiRect.y - 30, fullStar.width, fullStar.height);
                GUI.DrawTexture(levelRect, fullStar);
            }

            if (ratingLevels[level] >= 3)
            {
                levelRect.Set(guiRect.x + 90, guiRect.y - 17, fullStar.width, fullStar.height);
                GUI.DrawTexture(levelRect, fullStar);
            }
        }

        if (level > MySettings.unlockedLeves)
        {
            levelRect.Set(guiRect.x + guiRect.width - levelLock.width * 0.65f, guiRect.y + guiRect.height - levelLock.height * 0.8f, levelLock.width, levelLock.height);
            GUI.DrawTexture(levelRect, levelLock);
        }
    }
Beispiel #5
0
 public void StartGame(bool singleplayer, string singleplayerSavePath, ConnectData connectData)
 {
     ScreenGame screenGame = new ScreenGame();
     screenGame.menu = this;
     screenGame.Start(p, singleplayer, singleplayerSavePath, connectData);
     p.MouseCursorSetVisible(false);
     screen = screenGame;
 }