Beispiel #1
0
        public void handleCombatMenuEvent(CombatMenu.CombatMenuItem combatMenuItem)
        {
            // The current player has picked an action.  Tell the handler this action is complete.
            menuChoice = combatMenuItem;

            if (menuChoice == CombatMenu.CombatMenuItem.Attack)
            {
                // Find the weapon that was selected
                Player           player    = CurrentPlayer;
                InventoryStorage inventory = player.MyInventory;
                if (inventory != null)
                {
                    player.MyWeapon = inventory.getWeapon("pistol");
                }
            }

            combatActionHandler.handleActionComplete(actionType);
        }