Пример #1
0
        public AlchemyLevelUpMenu(int level)
            : base(Game1.viewport.Width / 2 - 384, Game1.viewport.Height / 2 - 256, 768, 512, false)
        {
            this.timerBeforeStart = 250;
            this.isActive         = true;
            this.width            = Game1.tileSize * 12;
            this.height           = Game1.tileSize * 8;
            this.okButton         = new ClickableTextureComponent(new Rectangle(this.xPositionOnScreen + this.width + 4, this.yPositionOnScreen + this.height - Game1.tileSize - IClickableMenu.borderWidth, Game1.tileSize, Game1.tileSize), Game1.mouseCursors, Game1.getSourceRectForStandardTileSheet(Game1.mouseCursors, 46, -1, -1), 1f, false);
            this.newCraftingRecipes.Clear();
            this.extraInfoForLevel.Clear();
            Game1.player.completelyStopAnimatingOrDoingAction();
            this.informationUp       = true;
            this.isProfessionChooser = false;
            this.currentLevel        = level;
            this.title = string.Concat(new object[]
            {
                "Level ",
                this.currentLevel,
                " Alchemy"
            });

            this.extraInfoForLevel = this.GetExtraInfoForLevel(this.currentLevel, Game1.player.luckLevel);
            sourceRectForLevelIcon = new Rectangle(0, 0, 16, 16);
            if (this.currentLevel > 0 && this.currentLevel % 5 == 0)
            {
                this.professionsToChoose.Clear();
                this.isProfessionChooser = true;
                if (this.currentLevel == 5)
                {
                    this.professionsToChoose.Add(Professions.Shaper);
                    this.professionsToChoose.Add(Professions.Sage);
                }
                else if (Game1.player.professions.Contains(Professions.Shaper))
                {
                    this.professionsToChoose.Add(Professions.Transmuter);
                    this.professionsToChoose.Add(Professions.Adept);
                }
                else
                {
                    this.professionsToChoose.Add(Professions.Aurumancer);
                    this.professionsToChoose.Add(Professions.Conduit);
                }
                this.leftProfessionDescription  = AlchemyLevelUpMenu.getProfessionDescription(this.professionsToChoose[0]);
                this.rightProfessionDescription = AlchemyLevelUpMenu.getProfessionDescription(this.professionsToChoose[1]);
            }
            int num = 0;

            this.height = num + Game1.tileSize * 4 + this.extraInfoForLevel.Count <string>() * Game1.tileSize * 3 / 4;
            Game1.player.freezePause = 100;
            this.gameWindowSizeChanged(Rectangle.Empty, Rectangle.Empty);
        }