コード例 #1
0
        public override void Update()
        {
            gearInfo.String =
                "Cost: " + gearPiece.GetUpgradeCost() +
                "\nBonus to all power: " + Math.Round(gearPiece.GetDamageBonus() * 100) + "%" +
                "\n" + gearPiece.GetDescritopion() + "\n" + ((gearPiece.unlocked) ? "Level: " + gearPiece.level : "Locked") +
                "\nBonus Damage Per Level: " + Math.Round(gearPiece.bonusPerLevel * 100) + "%" +
                "\nBonus Per Level: " + Math.Round(gearPiece.bonusPerLevel2 * 100) + "%";

            if (parentGui.MouseHover(parent))
            {
                Visible = true;
            }
            else
            {
                Visible = false;
            }

            if (parentGui.MouseHover(parent))
            {
                if (Input.MouseButtonPressed(MouseButton.Left))
                {
                    if (gearPiece.GetUpgradeCost() <= scene.player.honor)
                    {
                        scene.player.honor -= gearPiece.GetUpgradeCost();
                        gearPiece.UpgradeGear();
                    }
                }
            }
            base.Update();
        }
コード例 #2
0
        public override void Update()
        {
            var num = 0;

            foreach (var unit in scene.unitsList)
            {
                num += unit.level;
            }
            InfoText.String =
                "Player Info:" +
                "\nTotal Hero Levels: " + num +
                "\nCritical Strike Chance: " + Math.Round((scene.Bonuses[BonusType.CriticalChance] + scene.player.critChance) * 1000) / 10 + "%" +
                "\nCritical Strike Damage Multiplier: " + Math.Round(((1 + scene.Bonuses[BonusType.CriticalDamage]) * scene.player.critMagnitude)) +
                "\nAll Money Bonus: " + Math.Round((scene.Bonuses[BonusType.AllGold]) * 1000) / 10 + "%" +
                "\nMoney for Kills Bonus: " + Math.Round((scene.Bonuses[BonusType.MonsterGold]) * 1000) / 10 + "%" +
                "\nMoney From Chests Bonus: " + Math.Round((scene.Bonuses[BonusType.ChestGold]) * 1000) / 10 + "%" +
                "\nChance for Chest: " + Math.Round((0.02 * (1f + scene.Bonuses[BonusType.ChestChance])) * 1000) / 10 + "%" +
                "\n\nHonor on Prestige: " + scene.player.GetPrestigeRelicCount() + " (Middle Mouse Button)";
            if (parentGui.MouseHover(parent))
            {
                Visible = true;
            }
            else
            {
                Visible = false;
            }

            if (parentGui.MouseHover(parent))
            {
                if (Input.MouseButtonPressed(MouseButton.Middle))
                {
                    scene.player.Prestige();
                }
            }
            base.Update();
        }