注册会员 登录
Project1 返回首页

汪汪的个人空间 https://rpg.blue/?171386 [收藏] [复制] [分享] [RSS]

日志

【小白】机翻注释mv的 Scene_File

已有 52 次阅读2015-10-31 13:12 |个人分类:mv: rpg_scenes


//-----------------------------------------------------------------------------
// Scene_File
// 文件场景
// The superclass of Scene_Save and Scene_Load.
// 保存 和 读取 场景 的 超级类

function Scene_File() {
    this.initialize.apply(this, arguments);
}

Scene_File.prototype = Object.create(Scene_MenuBase.prototype);
Scene_File.prototype.constructor = Scene_File;
//初始化
Scene_File.prototype.initialize = function() {
    Scene_MenuBase.prototype.initialize.call(this);
};
//创建
Scene_File.prototype.create = function() {
    Scene_MenuBase.prototype.create.call(this);
    DataManager.loadAllSavefileImages();
    this.createHelpWindow();
    this.createListWindow();
};
//开始
Scene_File.prototype.start = function() {
    Scene_MenuBase.prototype.start.call(this);
    this._listWindow.refresh();
};
//保存文件id
Scene_File.prototype.savefileId = function() {
    return this._listWindow.index() + 1;
};
//创建帮助窗口
Scene_File.prototype.createHelpWindow = function() {
    this._helpWindow = new Window_Help(1);
    this._helpWindow.setText(this.helpWindowText());
    this.addWindow(this._helpWindow);
};
//创建列表窗口
Scene_File.prototype.createListWindow = function() {
    var x = 0;
    var y = this._helpWindow.height;
    var width = Graphics.boxWidth;
    var height = Graphics.boxHeight - y;
    this._listWindow = new Window_SavefileList(x, y, width, height);
    this._listWindow.setHandler('ok',     this.onSavefileOk.bind(this));
    this._listWindow.setHandler('cancel', this.popScene.bind(this));
    this._listWindow.select(this.firstSavefileIndex());
    this._listWindow.setTopRow(this.firstSavefileIndex() - 2);
    this._listWindow.setMode(this.mode());
    this._listWindow.refresh();
    this.addWindow(this._listWindow);
};
//模式
Scene_File.prototype.mode = function() {
    return null;
};
//活动列表窗口
Scene_File.prototype.activateListWindow = function() {
    this._listWindow.activate();
};
//帮助窗口文本
Scene_File.prototype.helpWindowText = function() {
    return '';
};
//第一个保存文件索引
Scene_File.prototype.firstSavefileIndex = function() {
    return 0;
};
//当保存文件确定
Scene_File.prototype.onSavefileOk = function() {
};


鸡蛋

鲜花

评论 (0 个评论)

facelist doodle 涂鸦笔

您需要登录后才可以评论 登录 | 注册会员

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-14 10:38

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

返回顶部