| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 0 |
| 经验 | |
| 最后登录 | 2023-6-24 |
| 在线时间 | 2 小时 |
- 梦石
- 0
- 星屑
- 23
- 在线时间
- 2 小时
- 注册时间
- 2023-6-16
- 回帖
- 0
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
在git上发现了Roseshadows(离影玫)大大发布的模拟手机电脑界面的插件(https://github.com/Roseshadows/RPG-Maker-MV),大概有以下几个相关的,查看了脚本界面却看不太明白,有问题想要请教各位大佬
比如说是这个范例,可以直接使用吗?要更改什么才能在游戏里显示出来?
- // 游戏中要用的手机界面。
- // 需要SceneDesktop.js作为前置插件。
- /*:
- * @plugindesc SceneDesktop.js的一个实例。需要 SceneDesktop.js 提供父类。
- * @author 离影玫 | Rose_shadows
- * @help 直接在代码中修改吧。
- */
- /**
- * Francis' phone
- */
- function Window_FrancisPhone() {
- this.initialize.apply(this, arguments);
- }
- Window_FrancisPhone.prototype = Object.create(Window_Desktop.prototype);
- Window_FrancisPhone.prototype.constructor = Window_FrancisPhone;
- Window_FrancisPhone.prototype.initialize = function(x, y) {
- this._iconList = [160,161,162,163,164,165];
- this._standardBackOpacity = 0;
- this._frameOpacity = 0;
- Window_Desktop.prototype.initialize.call(this, x, y);
- }
- Window_FrancisPhone.prototype.windowWidth = function() {
- return 287;
- }
- Window_FrancisPhone.prototype.windowHeight = function() {
- return 512;
- }
- Window_FrancisPhone.prototype.numVisibleRows = function() {
- return 7;
- }
- Window_FrancisPhone.prototype.maxCols = function() {
- return 4;
- }
- Window_FrancisPhone.prototype.lineHeight = function() {
- return this.iconDrawingHeight() + this.standardFontSize() + this.iconTextDistance() + 18;
- }
- Window_FrancisPhone.prototype.standardFontSize = function() {
- return 16;
- }
- Window_FrancisPhone.prototype.iconTextDistance = function() {
- return 2;
- }
- Window_FrancisPhone.prototype.makeCommandList = function() {
- this.addCommand('搜索', 'search1', true);
- this.addCommand('备忘录', 'notebook1', true);
- this.addCommand('视频', 'video1', true);
- this.addCommand('照片', 'photo1', true);
- this.addCommand('电话簿', 'phonelist1', true);
- this.addCommand('关机', 'shutdown1', true);
- }
- function Scene_FrancisPhone() {
- this.initialize.apply(this, arguments);
- }
- Scene_FrancisPhone.prototype = Object.create(Scene_Desktop.prototype);
- Scene_FrancisPhone.prototype.constructor = Scene_FrancisPhone;
- Scene_FrancisPhone.prototype.initialize = function() {
- Scene_Desktop.prototype.initialize.call(this);
- }
- Scene_FrancisPhone.prototype.create = function() {
- Scene_Desktop.prototype.create.call(this);
- this.createPhoneWindow();
- }
- Scene_FrancisPhone.prototype.createPhoneWindow = function() {
- this._phoneWindow = new Window_FrancisPhone(268, 63);
- this._phoneWindow.setHandler('search1', this.onFirst.bind(this));
- this._phoneWindow.setHandler('notebook1', this.onSecond.bind(this));
- this._phoneWindow.setHandler('video1', this.onThird.bind(this));
- this._phoneWindow.setHandler('photo1', this.onForth.bind(this));
- this._phoneWindow.setHandler('phonelist1', this.onFifth.bind(this));
- this._phoneWindow.setHandler('shutdown1', this.exitPhone.bind(this));
- this._phoneWindow.setHandler('cancel', this.popScene.bind(this));
- this.addWindow(this._phoneWindow);
- }
- // 指令相关的方法。
- Scene_FrancisPhone.prototype.onFirst = function() {
- SceneManager.push(Scene_Item);
- }
- Scene_FrancisPhone.prototype.onSecond = function() {
- SceneManager.push(Scene_Options);
- }
- Scene_FrancisPhone.prototype.onThird = function() {
- SceneManager.push(Scene_Save);
- }
- Scene_FrancisPhone.prototype.onForth = function() {
- SceneManager.push(Scene_Debug);
- }
- Scene_FrancisPhone.prototype.onFifth = function() {
- SceneManager.push(Scene_Load);
- }
- Scene_FrancisPhone.prototype.exitPhone = function() {
- SceneManager.pop();
- }
- Scene_FrancisPhone.prototype.createBackground = function() {
- Scene_Desktop.prototype.createBackground.call(this);
- var x = SceneManager._screenWidth/2;
- var y = SceneManager._screenHeight/2;
- this.addExtendedSprite('img/pictures/','Phone-1',x+50,y+30,255,$gameSwitches.value(15));
- }
复制代码 |
|