| 
 
| 赞 | 0 |  
| VIP | 0 |  
| 好人卡 | 4 |  
| 积分 | 1 |  
| 经验 | 4836 |  
| 最后登录 | 2022-10-29 |  
| 在线时间 | 345 小时 |  
 Lv1.梦旅人 
	梦石0 星屑140 在线时间345 小时注册时间2009-5-15帖子111 | 
4楼
 
 
 楼主|
发表于 2015-12-25 11:48:14
|
只看该作者 
| dujian15 发表于 2015-12-25 11:42 ![]() 万分感谢,我先调通代码,再言大恩
还是调不通,我把整个插件的内容放上来,大神过目扫一眼吧。
 
 
 function Window_Testing() {
 this.initialize.apply(this, arguments);
 
 
 var textW = Graphics.boxWidth - 36;
 var textH = 0;
 this.drawText("这是你的第一个窗口", 0, 0, textW, 'left');
 textH += this.lineHeight();
 this.drawText("给爷靠左", 0, textH, textW, 'left');
 textH += this.lineHeight();
 this.drawText("给爷置中", 0, textH, textW, 'center');
 textH += this.lineHeight();
 this.drawText("给爷靠右", 0, textH, textW, 'right');
 
 //上面的不用看
 
 //看这里看这里
 
 this.aaa();
 
 
 
 };
 
 //那么问题来了。
 Window_Testing.aaa = function(){
 alert('123');
 };
 
 
 
 //下面的不用看
 
 Window_Testing.prototype = Object.create(Window_Selectable.prototype);
 
 Window_Testing.prototype.initialize = function(x, y, width, height) {
 Window_Selectable.prototype.initialize.call(this, x, y, width, height);
 //this.a();
 //alert('a');
 };
 
 function Scene_Testing() {
 this.initialize.apply(this, arguments);
 };
 Scene_Testing.prototype = Object.create(Scene_MenuBase.prototype);
 Scene_Testing.prototype.initialize = function() {
 Scene_MenuBase.prototype.initialize.call(this);
 };
 Scene_Testing.prototype.create = function() {
 Scene_MenuBase.prototype.create.call(this);
 this._commandWindow = new Window_Testing(0, 0, Graphics.boxWidth, Graphics.boxHeight);
 //this._commandWindow2 = new Window_Testing(400,200,100,100);
 this.addWindow(this._commandWindow);
 //this.addWindow(this._commandWindow2);
 
 };
 Scene_Testing.prototype.update = function() {
 if (Input.isTriggered('escape') || Input.isTriggered('cancel')) {
 this._commandWindow.hide();
 SceneManager.goto(Scene_Map);
 };
 };
 
 
 
 
 
 
 
 
 
 
 插件参考台湾同胞写的那个教学。
 | 
 |