设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1798|回复: 1
打印 上一主题 下一主题

[有事请教] 想请教下为什么右边对应信息没有出来?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
198
在线时间
40 小时
注册时间
2020-10-10
帖子
10
跳转到指定楼层
1
发表于 2021-1-9 00:14:44 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
JAVASCRIPT 代码复制
  1. Window_MenuCommand.prototype.addOriginalCommands = function(){
  2.         this.addCommand("好感度", "likability", true);
  3. }
  4. var _Scene_Menu_createCommandWindow = Scene_Menu.prototype.createCommandWindow;
  5. Scene_Menu.prototype.createCommandWindow = function () {
  6.            _Scene_Menu_createCommandWindow.call(this);
  7.            this._commandWindow.setHandler('likability', this.commandLikability.bind(this));
  8. };
  9. Scene_Menu.prototype.commandLikability = function() {
  10.     SceneManager.push(Scene_Likability);
  11. };
  12. /*--------------------好感度窗口Start--------------------*/
  13. function Scene_Likability(){
  14.         this.initialize.apply(this, arguments);
  15. }
  16. Scene_Likability.prototype = Object.create(Scene_MenuBase.prototype);
  17. Scene_Likability.prototype.constructor = Scene_Likability;
  18.  
  19. Scene_Likability.prototype.initialize = function() {
  20.     Scene_MenuBase.prototype.initialize.call(this);
  21. };
  22. Scene_Likability.prototype.create = function() {
  23.     Scene_MenuBase.prototype.create.call(this);
  24.  
  25.     this._femaleWindow = new Window_Female(0, 0);
  26.     this.addWindow(this._femaleWindow);
  27.  
  28.     this._descriptionindow = new Window_Description(200, 0, 600, 400);
  29.     this.addWindow(this._descriptionindow);
  30. };
  31. Scene_Likability.prototype.commandDairy1 = function(){
  32.         this._femaleWindow.activate();
  33.         this._descriptionindow.refresh();
  34.         switch(this._femaleWindow.currentSymbol()){
  35.                 case 'Dairy1':
  36.                         this._descriptionindow.drawText("第一个日记", 0, 0, 600, "left");
  37.                         break;
  38.                 case 'Dairy2':
  39.                         this._descriptionindow.drawText("第二个日记", 0, 0, 600, "left");
  40.                         break;
  41.                 case 'Dairy3':
  42.                         this._descriptionindow.drawText("第三个日记", 0, 0, 600, "left");
  43.                         break;
  44.                 case 'Dairy4':
  45.                         this._descriptionindow.drawText("第四个日记", 0, 0, 600, "left");
  46.                         break;
  47.         }
  48. }
  49. /*---------------------好感度窗口End---------------------*/
  50. /*--------------------人物名列表Start--------------------*/
  51. function Window_Female(){
  52.         this.initialize.apply(this, arguments);
  53. }
  54. Window_Female.prototype = Object.create(Window_Command.prototype);
  55. Window_Female.prototype.constructor = Window_Female;
  56.  
  57. Window_Female.prototype.initialize = function(x, y) {
  58.     Window_Command.prototype.initialize.call(this, x, y);
  59. };
  60. Window_Female.prototype.makeCommandList = function(){
  61.         this.addCommand("日记一", "Dairy1", true);
  62.         this.addCommand("日记二", "Dairy2", true);
  63.         this.addCommand("日记三", "Dairy3", true);
  64.         this.addCommand("日记四", "Dairy4", true);
  65. };
  66. /*---------------------人物名列表End---------------------*/
  67. /*--------------------人物描述Start--------------------*/
  68. function Window_Description(){
  69.         this.initialize.apply(this, arguments);
  70. }
  71. Window_Description.prototype = Object.create(Window_Selectable.prototype);
  72. Window_Description.prototype.constructor = Window_Description;
  73.  
  74. Window_Description.prototype.initialize = function(x, y, width, height) {
  75.     Window_Selectable.prototype.initialize.call(this, x, y, width, height);
  76. };
  77. /*---------------------人物描述End---------------------*/


请问下有大佬能帮我解答下吗?

115截图20210109001208.png (483.55 KB, 下载次数: 7)

115截图20210109001208.png

Lv1.梦旅人

梦石
0
星屑
198
在线时间
40 小时
注册时间
2020-10-10
帖子
10
2
 楼主| 发表于 2021-1-9 22:23:40 | 只看该作者
已解决,因为没有更新指标!
此贴完结!
Scene_Likability.prototype.update = function(){
        Scene_MenuBase.prototype.update.call(this);
        if(this._tempIndex !== this._femaleWindow._index){//当前指标是否是旧的指标 若不是 则更新临时指标 并刷新右侧窗口内容
                this._tempIndex = this._femaleWindow._index;
                this.commandDairy1();
        }
}
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-6-11 15:42

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表