个人记录保存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.isWindow0; 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._popupTipDelayCount0){ return true; }else{ return false; } }; })();窗口源码