Ejemplo n.º 1
0
        public GDGameScreen_SP(MainGame game, GraphicsDeviceManager gdm, LevelBlueprint bp, FractionDifficulty diff, GraphBlueprint ws)
            : base(game, gdm, bp, diff, false, false, diff == FractionDifficulty.DIFF_0 && bp.UniqueID == Levels.LEVELID_1_1)
        {
            WorldBlueprint = ws;

            GameSpeedMode = MainGame.Inst.Profile.SingleplayerGameSpeed;
            UpdateGameSpeed();

            _unlocksBefore = UnlockManager.GetFullUnlockState().ToList();
        }
Ejemplo n.º 2
0
        public override void ShowScorePanel(LevelBlueprint lvl, PlayerProfile profile, HashSet <FractionDifficulty> newDifficulties, bool playerHasWon, int addPoints, int time)
        {
            ((GDGameHUD)HUD).BtnPause.IsEnabled = false;
            ((GDGameHUD)HUD).BtnSpeed.IsEnabled = false;

            GameSpeedMode = GameSpeedModes.NORMAL;

            HUD.AddModal(new HUDScorePanel(lvl, profile, newDifficulties, Difficulty, playerHasWon, addPoints, time), false);

            if (playerHasWon && (MainGame.Flavor == GDFlavor.IAB || MainGame.Flavor == GDFlavor.IAB_NOMP))
            {
                var diff = UnlockManager.GetFullUnlockState().Except(_unlocksBefore);
                foreach (var d in diff)
                {
                    if (d == Levels.WORLD_ID_ONLINE)
                    {
                        AchievementPopup.Show(L10N.T(L10NImpl.STR_ACH_UNLOCK_ONLINE));
                    }
                    if (d == Levels.WORLD_ID_MULTIPLAYER)
                    {
                        AchievementPopup.Show(L10N.T(L10NImpl.STR_ACH_UNLOCK_MULTIPLAYER));
                    }
                    if (d == Levels.WORLD_001.ID)
                    {
                        AchievementPopup.Show(L10N.TF(L10NImpl.STR_ACH_UNLOCK_WORLD, 1));
                    }
                    if (d == Levels.WORLD_002.ID)
                    {
                        AchievementPopup.Show(L10N.TF(L10NImpl.STR_ACH_UNLOCK_WORLD, 2));
                    }
                    if (d == Levels.WORLD_003.ID)
                    {
                        AchievementPopup.Show(L10N.TF(L10NImpl.STR_ACH_UNLOCK_WORLD, 3));
                    }
                    if (d == Levels.WORLD_004.ID)
                    {
                        AchievementPopup.Show(L10N.TF(L10NImpl.STR_ACH_UNLOCK_WORLD, 4));
                    }
                }
            }
        }