Project1
标题:
如何在地图上显示变量数字?
[打印本页]
作者:
zzz0000
时间:
2016-9-1 05:05
标题:
如何在地图上显示变量数字?
如何在地图上显示变量数字?请大神指教
作者:
xjzsq
时间:
2016-9-1 12:16
可以弄一个并行处理的事件,然后在里面显示文字,显示变量。
或者写一个在地图上长期存在的窗口,在里面显示,可以看看我的教程贴
作者:
玄天
时间:
2016-9-1 12:17
要么自己写代码,要么用已有的插件。
作者:
aasll
时间:
2016-9-4 17:33
推荐看我的那个教程贴,里面有一个功能的实现很相似
作者:
sfliad
时间:
2016-9-4 19:00
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,470, 810, 150);
this.addWindow(this._commandWindow);
}
Scene_Testing.prototype.update = function() {
if (Input.isTriggered('escape') || Input.isTriggered('cancel')) {
this._commandWindow.hide();
SceneManager.goto(Scene_Map);
}
};
拿去吧,窗口插件
作者:
zzz0000
时间:
2016-9-7 11:59
sfliad 发表于 2016-9-4 19:00
function Window_Testing() {
this.initialize.apply(this, arguments);
}
谢谢大神!
作者:
zzz0000
时间:
2016-9-7 12:10
sfliad 发表于 2016-9-4 19:00
function Window_Testing() {
this.initialize.apply(this, arguments);
}
怎么用啊?不会啊,求教教
作者:
玄天
时间:
2016-9-7 13:00
将那段代码复制到记事本,保存,成txt文件。
在文件目录下将那个txt文件的后缀名改成 .js
将这个js文件放到游戏工程目录下的js/plugins
在操作界面打开插件管理,选中那个js文件,设置为ON
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1