查看: 2488|回复: 1

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

[复制链接]
梦石
0
星屑
198
在线时间
40 小时
注册时间
2020-10-10
回帖
8
发表于 2021-1-9 00:14:44 | 显示全部楼层 |阅读模式

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

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

×
  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. Scene_Likability.prototype.initialize = function() {
  19.     Scene_MenuBase.prototype.initialize.call(this);
  20. };
  21. Scene_Likability.prototype.create = function() {
  22.     Scene_MenuBase.prototype.create.call(this);
  23.    
  24.     this._femaleWindow = new Window_Female(0, 0);
  25.     this.addWindow(this._femaleWindow);

  26.     this._descriptionindow = new Window_Description(200, 0, 600, 400);
  27.     this.addWindow(this._descriptionindow);
  28. };
  29. Scene_Likability.prototype.commandDairy1 = function(){
  30.         this._femaleWindow.activate();
  31.         this._descriptionindow.refresh();
  32.         switch(this._femaleWindow.currentSymbol()){
  33.                 case 'Dairy1':
  34.                         this._descriptionindow.drawText("第一个日记", 0, 0, 600, "left");
  35.                         break;
  36.                 case 'Dairy2':
  37.                         this._descriptionindow.drawText("第二个日记", 0, 0, 600, "left");
  38.                         break;
  39.                 case 'Dairy3':
  40.                         this._descriptionindow.drawText("第三个日记", 0, 0, 600, "left");
  41.                         break;
  42.                 case 'Dairy4':
  43.                         this._descriptionindow.drawText("第四个日记", 0, 0, 600, "left");
  44.                         break;
  45.         }
  46. }
  47. /*---------------------好感度窗口End---------------------*/
  48. /*--------------------人物名列表Start--------------------*/
  49. function Window_Female(){
  50.         this.initialize.apply(this, arguments);
  51. }
  52. Window_Female.prototype = Object.create(Window_Command.prototype);
  53. Window_Female.prototype.constructor = Window_Female;

  54. Window_Female.prototype.initialize = function(x, y) {
  55.     Window_Command.prototype.initialize.call(this, x, y);
  56. };
  57. Window_Female.prototype.makeCommandList = function(){
  58.         this.addCommand("日记一", "Dairy1", true);
  59.         this.addCommand("日记二", "Dairy2", true);
  60.         this.addCommand("日记三", "Dairy3", true);
  61.         this.addCommand("日记四", "Dairy4", true);
  62. };
  63. /*---------------------人物名列表End---------------------*/
  64. /*--------------------人物描述Start--------------------*/
  65. function Window_Description(){
  66.         this.initialize.apply(this, arguments);
  67. }
  68. Window_Description.prototype = Object.create(Window_Selectable.prototype);
  69. Window_Description.prototype.constructor = Window_Description;

  70. Window_Description.prototype.initialize = function(x, y, width, height) {
  71.     Window_Selectable.prototype.initialize.call(this, x, y, width, height);
  72. };
  73. /*---------------------人物描述End---------------------*/
复制代码


请问下有大佬能帮我解答下吗?
115截图20210109001208.png
梦石
0
星屑
198
在线时间
40 小时
注册时间
2020-10-10
回帖
8
 楼主| 发表于 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();
        }
}
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部