wdytoya wdytoya
=
关注数: 339 粉丝数: 115 发帖数: 4,538 关注贴吧数: 23
初学者求问覆写与否的方法调用问题 在看Java开发实战经典的时候看到覆写一部分,大致代码如下: public class Hello { public static void main(String[] args) { new Student().fun(); } } class Person { private void print() { System.out.println("Person"); } void fun() { this.print(); } } class Student extends Person { public void print() { System.out.println("Student"); } } 这时候子类Student的print不算覆写了父类Person的print,这时候fun()调用的是父类的print输出”Person"。但是一旦去掉父类print的private访问权限,使得子类的print覆写了父类的print,这时候就调用了子类的print输出”Student“了。 这一块内容我作为初学者表示很难理解: 1. 如果父类的print有private访问权限,我可以这么理解,new Student().fun()在子类中没找到fun(),然后到父类中找到了,这时候this指向父类,所以this.print()调用的是父类的print()从而输出了“Person"。但是这种理解在去掉private访问权限后的情况中又说不通了。 2. 如果父类的print没有private访问权限,我可以这么理解,子类继承了父类的fun(),所以调用Student().fun()就直接调用了子类的fun(),这时候this指向子类,所以直接调了子类的print()输出”Student"。但是这样理解在private访问权限有的情况下又说不通了。 有没有大神能解释一下这两种情况怎么理解啊?我百度了一下有说是动态绑定的原因,但是我稍微看了下也没有把动态绑定讲清楚的。还是理解不能啊。
关于暗金物品没纪录的问题 楼主今天发了个更新日志贴结果好多人反应怎么没修复暗金装备不纪录的BUG,然后楼主特的跑去dev.dota2.com看了下,发现这个问题早就有了嘛,V社专门开了个贴用来让人反馈的,贴子如下:http://dev.dota2.com/showthread.php?t=75705大意就是: 如果你是以下三种情况的其中一种,那么请在下面回复中贴上你的Steam社区链接(就是这样子的http://steamcommunity.com/id/alystair或这样子的http://steamcommunity.com/profiles/76561198061041841),然后V社的工作人员会检查你的物品并收集数据,并请你在回复中说明你的问题的情况,发生的时间(下面甚至有人贴录像编号),以至是否经常发生。 1、暗金装备的纪录不涨了 2、暗金装备升级了但是上面的名字没变 3、暗金装备不记录观战场次(似乎有人在下面也贴了信使观战场次的问题) 产生这个问题的原因可能是后台的Game Coordinator服务器崩了或重启了导致数据没纪录,这个服务器偶尔会崩溃,我们重启也只是在非高峰时段重启,要强调的是这个情况是不可避免的,并且也只是很小的机率会崩溃。 同时我们也在检查是否是系统问题或者代码的BUG导致这个情况的发生,甚至可能是特定的装备才会出现这些情况。 ******************************************************************** 总之解决办法就是自己去dev.dota2.com论坛反馈情况,贴子的链接上面给了,然后V社检查一下你的装备是不是纪录缺失了,当然上面都是英语的,你也可以考虑去下面的中文版块反映,虽然我不确定是否有效。 请记住反馈时一定要附上自己的Steam社区链接(格式上面也给了),然后写明有什么问题,能附上特定场次最好,能提供情况是什么时候产生的也好,不能的话也要说明一下这情况是经常发生、每次都发生还是偶尔发生等等等等
8月22日Test更新日志 渣翻轻喷,我自己觉得比较重点的地方打星号标注了一下,2L勘误 Gameplay Fixed players' current gold being networked to enemy players. (表示不知道这个network该怎么翻)修复当前金钱会被对面看到? Fixed Spirit Breaker's charge target being networked to enemy players. (还是这个network不知道怎么翻)修复白牛冲的对象会被对面知道? Picking up an armlet that is toggled on will only grant the buff if you own the armlet. 捡起开启的臂章时只提供BUFF Autocast abilities check target type rules consistently. This should prevent Clinkz's searing arrows hitting wards, for example. 自动施放技能将检查目标规则的一致性。这将预防例如骨弓的火箭攻击眼的问题 ****************************************** Added Elder Titan, Abaddon, Centaur and Troll Warlord to Captain's Mode. 加入上古巨神、亚巴顿、人马、巨魔进入CM模式 ****************************************** Fixed Neutral Thunderhide not using Slam when 3 enemies are nearby. 修复远古野雷龙在附近有3个敌人时没有施放猛击技能 Fixed Neutral Thunderhide's Slam not slowing attack speed. 修复远古野雷龙的猛击技能没有减攻速的错误 Ancient Apparition: Frostbite debuff will prevent health gain from levelling up, extra strength or extra max hp. 修复冰魂的冰封禁制(这不是冰女的二技能么)的DEBUFF会阻止升级、额外力量获得和额外最大生命值获得所产生的生命值获得(我也不知道这么翻对不对) Slark: Fixed BKB not removing Pounce's Leash. 修复BKB解不掉小鱼人的跳拉的错误 Treant Protector: Fixed Overgrowth affecting couriers. 修复大树的大招能控住信使的错误 Troll Warlord: Fixed Illusions benefiting from Fervor. 修复幻象能得到巨魔被动加成的错误 Troll Warlord: Fixed ranged form sometimes being able to bash. 修复巨魔远程状态下有机率产生重击的错误 Weaver's geminate ability no longer activates when attacking wards. 蚂蚁攻击眼时不再产生连击效果 ****************************************** Weaver's time lapse and Disruptor's glimpse now can rewind things back to before the ability was skilled. 蚂蚁的大招和干扰者的二技能现在能使物品回到技能施放前的状态(不太确定是物品回到之前的状态还是技能回到之前的状态,有兴趣的人可以开TEST测试下) ****************************************** UI Runes now draw in the minimap for spectators. 观战现在小地图上能看到符在哪刷 Increased the penalty for not readying up from 45 seconds to 2 minutes. 提高45秒到2分钟还没准备好的惩罚(不太确定是不是我理解的这个意思,如果是的话像我这种小霸王岂不是悲剧了) Spectator stats dropdown is unlocked while listening to broadcasters. 观战时在听解说的时候不再绑定数据面板 Added a preference and cvar "dota_spectator_use_broadcaster_stats_panel" to allow spectators to have full control over the stats panels. 增加变量让观众全权控制数据面板 Private (friend/guild) lobbies now display their game name so that those browsing lobbies can get more info on what the lobby is for. 私人房间现在将显示名称以支持搜索房间时获得更多信息(不太确实翻得对不对) ****************************************** Changed drag-select of units to use the same hit detection as click*select. This fixes a number of issues where units would not get selected. 改变框选模式以采用和点选模式相同的点击检测逻辑,这将解决一些无法选择单位的问题(具体是什么样的逻辑大家可以去TEST测试下,看是不是只要碰到一点点就能框到) ****************************************** Fixed bugs that were allowing edge panning to be enabled during drag*select. 修复框选时允许滑屏框选(楼主英死早,分不清这个是原来能现在修成不能还是原来不能现在修成能) Reduced CPU usage of drag-select. 降低框选时的CPU占用 Fixed some newline formatting errors in the combat log. 修复战斗日志的一些新建行格式上的错误 Prevented guides for the previously-played hero from erroneously showing up at the start of the next game. 修复以前使用英雄在下把开始的指引时显示错误 Added AOE hover indicator for Death Pulse. 增加NEC一技能的AOE范围指示器 Economy ****************************************** Added Waldi courier, Ocula ward, 3 HUDs and 14 hero item sets to the store. 新增Waldi信使、Ocula眼,3个HUD和14套英雄套装(钱包不够了) ****************************************** Updated Sniper's workshop model files with improved weighting, including corrected smd files. 更新火枪的工坊模型文件,包括纠正smd文件 Audio Fixed bad interactions with some looping sounds and FoW. (FOW是什么?)这句还真不会翻。。。 Fixed Reincarnate stinger sometimes playing late when triggered in vision but out of hearing range. 修复重生音乐在指向重生位置但还未到接收范围时有时播放晚了的错误 Fixed some item cast sounds that could be heard through FoW. 修复一些物品的声音可通过FoW听到的问题(FoW到底是神马) Typing "tu" in chat no longer triggers hero "thank you" lines. 输入tu不会再指向英雄的“thank you”语音(老老实实打ty吧) Mac/Linux Fixed crash when using certain spells / illusions on Intel HD4000. [Mac] 修复在使用某些技能/幻象时会导致崩溃的错误,此种情况为使用了Intel HD4000显卡和Mac操作系统的朋友会遇到的悲剧 Fixed intermittent crash when cmd*tabbing. [Mac] 修复Mac用户在cmd tabbing(控制台切换?)时会产生间歇性的崩溃 Fixed issues with older PulseAudio installations. [Linux] 修复Linux用户在安装了旧版PulseAudio的情况下会产生的问题 Improved stability when showing webpages. 提升浏览网页的稳定性 Allow setting language of audio and text separately, through Steam. (Text comes from Steam's language, audio comes from the language set in Dota 2's properties on Steam) 允许通过Steam单独设置音效和文字的语言了(文字语言由Steam语言决定,音效语言由Steam中Dota2的语言设置决定) Made Dota2 respond to window manager requests to close it. 使Dota2能响应窗口管理器的请求来关闭它 Fixes to make Dota2 work on a broader set of video cards on Linux 使Linux用户的Dota2能使用更宽的视频卡设置 Fixed key repeat to work in text entry windows. 修复按键在文字进入窗口时重复作用的问题?(不太确定翻得对不对) Fixed loading screens to show an image instead of a black screen 给载入界面加了一张图片,而不是原来的黑屏 Fixed a bug preventing multiple users from playing Dota2 (at different times) on a machine. 修复多用户在同一台机器的不同时间玩Dota2时会产生错误的问题 Fixed sounds not working when a matchmaking game is ready to start. Added a desktop notification on Linux 修复匹配成功时没有提示音的错误,给Linux用户增加了桌面提醒 Added XBox 360 spectating controller support. 增加XBOX360控制器的观战支持 Fixed crash on hero selection screen on Linux. 修复Linux用户在选人界面时的崩溃问题 Fixed a rendering bug when turning off Specular in advanced video settings. 修复在关掉高级视频设置中的Specular(不清楚具体是哪个设置)后产生的错误 Fixed mouse offset bug and window size/aspect ratio issue when moving from full screen to windowed modes. 修复从全屏调到窗口模式后鼠标偏移和窗口大小/屏幕比例等方面的错误
1 下一页