RPGMZ 游戏场景全局提示框 带三秒隐藏插件
2026/5/12 13:54:52 网站建设 项目流程

个人记录保存

Project1论坛 小圈子 人才 不得学习我的技术

//================================================================================================= // GlobalPopupTip.js //================================================================================================= /*: * @target MZ * @plugindesc 游戏场景全局提示框 带三秒隐藏。 * @author 希夷先生 * * @help * 插件功能:游戏场景全局提示框 带三秒隐藏 * 使用方法 SceneManager._scene.showTip(" 金钱 + 300$"); */ (() => { const _Scene_Base_prototype_create = Scene_Base.prototype.create; Scene_Base.prototype.create = function() { _Scene_Base_prototype_create.call(this); this._popupTipWindow = null; this._popupTipDelayCount = 0; }; const _Scene_Base_prototype_update = Scene_Base.prototype.update; Scene_Base.prototype.update = function() { _Scene_Base_prototype_update.call(this); if(this._popupTipWindow == null){ this._popupTipWindow = new _New_Window(new Rectangle(1, 1, 10, 10)); this._popupTipWindow.paddingScale = 2; this._popupTipWindow.npc_text = "提示框"; this._popupTipWindow.visible = false; this._popupTipWindow.isWindow=0; this.addChild(this._popupTipWindow); } if (this._popupTipDelayCount > 0) { this._popupTipDelayCount--; if(this._popupTipWindow.visible == false){ this._popupTipWindow.visible = true; } if(this._popupTipDelayCount <= 0){ this._popupTipWindow.visible = false; } return; } }; Scene_Base.prototype.showTip = function(text) { SceneManager._scene._popupTipWindow.npc_text = text; SceneManager._scene._popupTipDelayCount = 240; }; Scene_Base.prototype.isShowTip = function() { if(SceneManager._scene._popupTipDelayCount<=0){ return true; }else{ return false; } }; })();

窗口源码

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

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

立即咨询