查看: 2937|回复: 2

[有事请教] MV窗口的文字是在哪里处理的

[复制链接]
梦石
0
星屑
12161
在线时间
4435 小时
注册时间
2014-4-11
回帖
5616

开拓者

发表于 2018-4-26 16:32:43 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
比如   
变量1 = '你是谁'
变量 =  "不知道\V[1]"
怎么得出这个变量的全部,就是   "不知道你是谁"
MV的这部分是在哪里处理的。
搜索不到\V
梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
回帖
1464
发表于 2018-4-27 00:43:57 | 显示全部楼层

/**转换换码字符 */
Window_Base.prototype.convertEscapeCharacters = function(text) {
        //替换\\为\xlb
    text = text.replace(/\\/g, '\x1b');
        //替换\xlb\xlb 为 \\
    text = text.replace(/\x1b\x1b/g, '\\');
    //替换\xlbV[n]为  变量
    text = text.replace(/\x1bV\[(\d+)\]/gi, function() {
        return $gameVariables.value(parseInt(arguments[1]));
    }.bind(this));
    //替换\xlbV[n]为  变量
    text = text.replace(/\x1bV\[(\d+)\]/gi, function() {
        return $gameVariables.value(parseInt(arguments[1]));
    }.bind(this));
    text = text.replace(/\x1bN\[(\d+)\]/gi, function() {
        return this.actorName(parseInt(arguments[1]));
    }.bind(this));
    text = text.replace(/\x1bP\[(\d+)\]/gi, function() {
        return this.partyMemberName(parseInt(arguments[1]));
    }.bind(this));
    text = text.replace(/\x1bG/gi, TextManager.currencyUnit);
    return text;
};

点评

感谢  发表于 2018-4-27 19:27

评分

参与人数 1赞 +1 收起 理由
yang1zhi + 1 精品文章

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部