Beispiel #1
0
        private void ProcessSelectLevel(Packet packet)
        {
            LevelVO level = new LevelVO();

            level.thinkTime = 15;
            ArrayUtil.Shuffle(questions);
            level.questions = questions.GetRange(0, 3);
            gameManager.EnterLevel(level);
            //EnterLevel (level);
            //Debug.Log (questions.Count);
        }
Beispiel #2
0
    void initLevels()
    {
        LevelVO level;

        GameModel.inst.LevelsData         = new List <LevelVO>();
        GameModel.inst.LevelsDataForCount = new List <LevelVO>();

        level       = new LevelVO(1, true, GameStrategy.NO_TRICKS, "Levels/Level1", Config.PLAYER_A, -20);
        level.Goals = new string[] { RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK };
        GameModel.inst.LevelsData.Add(level);
        GameModel.inst.LevelsDataForCount.Add(level.Clone);

        level       = new LevelVO(2, true, GameStrategy.NO_HEARTS, "Levels/Level2", Config.PLAYER_B, -20);
        level.Goals = new string[] { "4_1", "4_2", "4_3", "4_4", "4_5", "4_6", "4_7", "4_8" };
        GameModel.inst.LevelsData.Add(level);
        GameModel.inst.LevelsDataForCount.Add(level.Clone);

        level       = new LevelVO(3, true, GameStrategy.NO_BOYS, "Levels/Level3", Config.PLAYER_C, -20);
        level.Goals = new string[] { "4_7", "4_5", "3_7", "3_5", "2_7", "2_5", "1_7", "1_5" };
        GameModel.inst.LevelsData.Add(level);
        GameModel.inst.LevelsDataForCount.Add(level.Clone);

        level       = new LevelVO(4, true, GameStrategy.NO_GIRLS, "Levels/Level4", Config.PLAYER_ME, -40);
        level.Goals = new string[] { "4_6", "3_6", "2_6", "1_6" };
        GameModel.inst.LevelsData.Add(level);
        GameModel.inst.LevelsDataForCount.Add(level.Clone);

        level       = new LevelVO(5, true, GameStrategy.NO_LAST_TRICKS, "Levels/Level5", Config.PLAYER_A, -80);
        level.Goals = new string[] { RuleModel.TRICK_7, RuleModel.TRICK_8 };
        GameModel.inst.LevelsData.Add(level);
        GameModel.inst.LevelsDataForCount.Add(level.Clone);

        level       = new LevelVO(6, true, GameStrategy.NO_KING, "Levels/Level6", Config.PLAYER_B, -160);
        level.Goals = new string[] { "4_7" };
        GameModel.inst.LevelsData.Add(level);
        GameModel.inst.LevelsDataForCount.Add(level.Clone);

        level       = new LevelVO(7, true, GameStrategy.NO_ANY, "Levels/Level7", Config.PLAYER_C, 0);
        level.Goals = new string[] { RuleModel.ANY, RuleModel.ANY, RuleModel.ANY, RuleModel.ANY, RuleModel.ANY, RuleModel.ANY, RuleModel.ANY, RuleModel.ANY };
        GameModel.inst.LevelsData.Add(level);
        GameModel.inst.LevelsDataForCount.Add(level.Clone);

        level       = new LevelVO(8, false, GameStrategy.TAKE_TRICKS, "Levels/Level8", Config.PLAYER_A, 20);
        level.Goals = new string[] { RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK, RuleModel.GOAL_TRICK };
        GameModel.inst.LevelsData.Add(level);

        level       = new LevelVO(9, false, GameStrategy.TAKE_HEARTS, "Levels/Level9", Config.PLAYER_B, 20);
        level.Goals = new string[] { "4_1", "4_2", "4_3", "4_4", "4_5", "4_6", "4_7", "4_8" };
        GameModel.inst.LevelsData.Add(level);

        level       = new LevelVO(10, false, GameStrategy.TAKE_BOYS, "Levels/Level10", Config.PLAYER_C, 20);
        level.Goals = new string[] { "4_7", "4_5", "3_7", "3_5", "2_7", "2_5", "1_7", "1_5" };
        GameModel.inst.LevelsData.Add(level);

        level       = new LevelVO(11, false, GameStrategy.TAKE_GIRLS, "Levels/Level11", Config.PLAYER_ME, 40);
        level.Goals = new string[] { "4_6", "3_6", "2_6", "1_6" };
        GameModel.inst.LevelsData.Add(level);

        level       = new LevelVO(12, false, GameStrategy.TAKE_LAST_TRICKS, "Levels/Level12", Config.PLAYER_A, 80);
        level.Goals = new string[] { RuleModel.TRICK_7, RuleModel.TRICK_8 };
        GameModel.inst.LevelsData.Add(level);

        level       = new LevelVO(13, false, GameStrategy.TAKE_KING, "Levels/Level13", Config.PLAYER_B, 160);
        level.Goals = new string[] { "4_7" };
        GameModel.inst.LevelsData.Add(level);

        level       = new LevelVO(14, false, GameStrategy.TAKE_ANY, "Levels/Level14", Config.PLAYER_C, 0);
        level.Goals = new string[] { RuleModel.ANY, RuleModel.ANY, RuleModel.ANY, RuleModel.ANY, RuleModel.ANY, RuleModel.ANY, RuleModel.ANY, RuleModel.ANY };
        GameModel.inst.LevelsData.Add(level);

        for (int playerIndex = 0; playerIndex < 4; playerIndex++)
        {
            for (int i = 0; i < GameModel.inst.LevelsData.Count; i++)
            {
                GameModel.inst.Players[playerIndex].LevelsData.Add(GameModel.inst.LevelsData[i].Clone);
            }
        }
    }