RPGMZ游戏引擎 如何手动控制文字显示速度
2026/5/12 5:01:07 网站建设 项目流程

直接上代码

const _Window_Base_prototype_initialize = Window_Base.prototype.initialize; Window_Base.prototype.initialize = function(rect) { _Window_Base_prototype_initialize.call(this, rect); this.文字速度缓冲 = 0; };

this.文字速度缓冲 = 0; 进行缓冲

Window_Base.prototype.processCharacter = function(textState) { this.文字速度缓冲 = this.文字速度缓冲 +0.1; if(this.文字速度缓冲 < 0.3){ return; } this.文字速度缓冲 = 0; const c = textState.text[textState.index++]; if (c.charCodeAt(0) < 0x20) { this.flushTextState(textState); this.processControlCharacter(textState, c); } else { textState.buffer += c; } };

this.文字速度缓冲 > 0.3 处理字符 速度可调整

这种方法适合不会写剧本的人使用 文字慢速显示 消耗玩家阅读时间 这样就可以弥补 剧情少的问题了

结尾总结

请Project1论坛的小圈子 离开

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询