赞 | 2 |
VIP | 33 |
好人卡 | 33 |
积分 | 14 |
经验 | 54000 |
最后登录 | 2024-9-21 |
在线时间 | 1295 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 1358
- 在线时间
- 1295 小时
- 注册时间
- 2012-8-4
- 帖子
- 749
|
我是不是写错了,发生错误- function Window_Testing() {
- this.initialize.apply(this, arguments);
- }
- 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.drawSomeText();
- }
-
- Window_Testing.prototype.drawSomeText = function() {
- var textW = 360;
- 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');
- }
-
- 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, 400, 200);
- this.addWindow(this._commandWindow);
- }
- Scene_Testing.prototype.update = function() {
- if (Input.isTriggered('escape') || Input.isTriggered('cancel')) {
- this._commandWindow.hide();
- SceneManager.goto(Scene_Map);
- }
- };
复制代码 |
|