Window_MenuCommand.prototype.addOriginalCommands = function(){ this.addCommand("好感度", "likability", true); } var _Scene_Menu_createCommandWindow = Scene_Menu.prototype.createCommandWindow; Scene_Menu.prototype.createCommandWindow = function () { _Scene_Menu_createCommandWindow.call(this); this._commandWindow.setHandler('likability', this.commandLikability.bind(this)); }; Scene_Menu.prototype.commandLikability = function() { SceneManager.push(Scene_Likability); }; /*--------------------好感度窗口Start--------------------*/ function Scene_Likability(){ this.initialize.apply(this, arguments); } Scene_Likability.prototype = Object.create(Scene_MenuBase.prototype); Scene_Likability.prototype.constructor = Scene_Likability; Scene_Likability.prototype.initialize = function() { Scene_MenuBase.prototype.initialize.call(this); }; Scene_Likability.prototype.create = function() { Scene_MenuBase.prototype.create.call(this); this._femaleWindow = new Window_Female(0, 0); this.addWindow(this._femaleWindow); this._descriptionindow = new Window_Description(200, 0, 600, 400); this.addWindow(this._descriptionindow); }; Scene_Likability.prototype.commandDairy1 = function(){ this._femaleWindow.activate(); this._descriptionindow.refresh(); switch(this._femaleWindow.currentSymbol()){ case 'Dairy1': this._descriptionindow.drawText("第一个日记", 0, 0, 600, "left"); break; case 'Dairy2': this._descriptionindow.drawText("第二个日记", 0, 0, 600, "left"); break; case 'Dairy3': this._descriptionindow.drawText("第三个日记", 0, 0, 600, "left"); break; case 'Dairy4': this._descriptionindow.drawText("第四个日记", 0, 0, 600, "left"); break; } } /*---------------------好感度窗口End---------------------*/ /*--------------------人物名列表Start--------------------*/ function Window_Female(){ this.initialize.apply(this, arguments); } Window_Female.prototype = Object.create(Window_Command.prototype); Window_Female.prototype.constructor = Window_Female; Window_Female.prototype.initialize = function(x, y) { Window_Command.prototype.initialize.call(this, x, y); }; Window_Female.prototype.makeCommandList = function(){ this.addCommand("日记一", "Dairy1", true); this.addCommand("日记二", "Dairy2", true); this.addCommand("日记三", "Dairy3", true); this.addCommand("日记四", "Dairy4", true); }; /*---------------------人物名列表End---------------------*/ /*--------------------人物描述Start--------------------*/ function Window_Description(){ this.initialize.apply(this, arguments); } Window_Description.prototype = Object.create(Window_Selectable.prototype); Window_Description.prototype.constructor = Window_Description; Window_Description.prototype.initialize = function(x, y, width, height) { Window_Selectable.prototype.initialize.call(this, x, y, width, height); }; /*---------------------人物描述End---------------------*/
115截图20210109001208.png (483.55 KB, 下载次数: 17)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |