注册会员 登录
Project1 返回首页

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

日志

【小白】机翻注释mv的 Scene_Save

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


//-----------------------------------------------------------------------------
// Scene_Save
// 保存场景
// The scene class of the save screen.
// 处理 保存画面 的 场景类

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

Scene_Save.prototype = Object.create(Scene_File.prototype);
Scene_Save.prototype.constructor = Scene_Save;
//初始化
Scene_Save.prototype.initialize = function() {
    Scene_File.prototype.initialize.call(this);
};
//模式
Scene_Save.prototype.mode = function() {
    return 'save';
};
//帮助窗口文本
Scene_Save.prototype.helpWindowText = function() {
    return TextManager.saveMessage;
};
//第一个保存文件索引
Scene_Save.prototype.firstSavefileIndex = function() {
    return DataManager.lastAccessedSavefileId() - 1;
};
//当保存文件确定
Scene_Save.prototype.onSavefileOk = function() {
    Scene_File.prototype.onSavefileOk.call(this);
    $gameSystem.onBeforeSave();
    if (DataManager.saveGame(this.savefileId())) {
        this.onSaveSuccess();
    } else {
        this.onSaveFailure();
    }
};
//当保存成功
Scene_Save.prototype.onSaveSuccess = function() {
    SoundManager.playSave();
    this.popScene();
};
//当保存失败
Scene_Save.prototype.onSaveFailure = function() {
    SoundManager.playBuzzer();
    this.activateListWindow();
};


鸡蛋

鲜花

评论 (0 个评论)

facelist doodle 涂鸦笔

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

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

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

GMT+8, 2024-5-14 22:01

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

返回顶部