赞 | 2 |
VIP | 0 |
好人卡 | 0 |
积分 | 3 |
经验 | 0 |
最后登录 | 2023-7-24 |
在线时间 | 49 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 262
- 在线时间
- 49 小时
- 注册时间
- 2019-1-12
- 帖子
- 48
|
2楼
楼主 |
发表于 2021-2-4 20:15:27
|
只看该作者
var $refresh = true; function Window_MapStatus() { this.initialize.apply(this,arguments) } Window_MapStatus.prototype = Object.create(Window_Base.prototype); Window_MapStatus.prototype.constructor = Window_MapStatus; Window_MapStatus.prototype.initialize = function (x, y, width, height) { Window_Base.prototype.initialize.call(this, x, y, width, height); this.opacity = 0; this.refresh(); } Window_MapStatus.prototype.refresh = function () { this.contents.clear(); this.drawText($gameVariables.value(1), 0, 0, this.Width); this.drawText(":", 30, 0, this.Width); this.drawText($gameVariables.value(2), 60, 0, this.Width); this.drawText(":", 90, 0, this.Width); this.drawText($gameVariables.value(3), 120, 0, this.Width); } Scene_Map.prototype.createDisplayObjects = function () { //创建精灵组 this.createSpriteset(); //创建地图名称窗口 this.createMapNameWindow(); //创建窗口层 this.createWindowLayer(); //创建所有窗口 this.createAllWindows(); //创建一个显示角色状态的窗口 this.createStatusWindow(); }; //创建一个显示名字的窗口 Scene_Map.prototype.createStatusWindow = function () { this._StatusWindow = new Window_MapStatus(0,0,410,216); this._StatusWindow.refresh(); this.addWindow(this._StatusWindow); //把窗口添加到窗口层 };
var $refresh = true;
function Window_MapStatus() {
this.initialize.apply(this,arguments)
}
Window_MapStatus.prototype = Object.create(Window_Base.prototype);
Window_MapStatus.prototype.constructor = Window_MapStatus;
Window_MapStatus.prototype.initialize = function (x, y, width, height) {
Window_Base.prototype.initialize.call(this, x, y, width, height);
this.opacity = 0;
this.refresh();
}
Window_MapStatus.prototype.refresh = function () {
this.contents.clear();
this.drawText($gameVariables.value(1), 0, 0, this.Width);
this.drawText(":", 30, 0, this.Width);
this.drawText($gameVariables.value(2), 60, 0, this.Width);
this.drawText(":", 90, 0, this.Width);
this.drawText($gameVariables.value(3), 120, 0, this.Width);
}
Scene_Map.prototype.createDisplayObjects = function () {
//创建精灵组
this.createSpriteset();
//创建地图名称窗口
this.createMapNameWindow();
//创建窗口层
this.createWindowLayer();
//创建所有窗口
this.createAllWindows();
//创建一个显示角色状态的窗口
this.createStatusWindow();
};
//创建一个显示名字的窗口
Scene_Map.prototype.createStatusWindow = function () {
this._StatusWindow = new Window_MapStatus(0,0,410,216);
this._StatusWindow.refresh();
this.addWindow(this._StatusWindow); //把窗口添加到窗口层
};
|
|