コード例 #1
0
        public SwitchOutWeaponCommand(SwitchWeaponMenu menu, IWeapon weapon)
        {
            this.menu   = menu;
            this.weapon = weapon;

            this.Name        = weapon.Name;
            this.Description = weapon.Description;
        }
コード例 #2
0
        public void Execute()
        {
            SwitchWeaponMenu newMenu = new SwitchWeaponMenu(game, player, weaponIndex);

            game.SwitchOutMenu(newMenu);
            BackCommand command = new BackCommand(game, newMenu, oldMenu);

            newMenu.AddCommand(command);
        }