Ejemplo n.º 1
0
        public override bool ProcessKeyboard(Keyboard info)
        {
            foreach (var keybinding in IndexedKeybindings)
            {
                if (info.IsKeyPressed(keybinding.Key))
                {
                    var itemPreviewWindow = UserInterfaceManager.Get <ItemPreviewWindow>();
                    itemPreviewWindow.
                    SetObjectForPreview(InventoryManager.GetSlot <ISlot>(Game.GameSession.Player.Inventory, keybinding.ObjectId).Item.FirstOrDefault().ObjectId);
                    return(true);
                }
            }

            if (info.IsKeyPressed(KeybindingManager.GetKeybinding <IKeybinding>(Keybindings.Back)))
            {
                this.FullTransition(UserInterfaceManager.Get <GameWindow>());
                return(true);
            }

            if (info.IsKeyPressed(Microsoft.Xna.Framework.Input.Keys.E)) // REWORK
            {
                Equip();
            }

            if (info.IsKeyPressed(Microsoft.Xna.Framework.Input.Keys.U))
            {
                Enchant.EnchantSteel(Game.GameSession.Player.Inventory.CurrentWeapon);
            }

            return(false);
        }
Ejemplo n.º 2
0
 private void UpgradeWeapon()
 {
     Enchant.EnchantSteel(Player.CurrentWeapon);
     Console.WriteLine("Successfuly upgraded!");
 }