| 
 
| 赞 | 2 |  
| VIP | 50 |  
| 好人卡 | 23 |  
| 积分 | 1 |  
| 经验 | 15845 |  
| 最后登录 | 2018-11-11 |  
| 在线时间 | 306 小时 |  
 Lv1.梦旅人 
	梦石0 星屑60 在线时间306 小时注册时间2014-8-5帖子416 | 
| 本帖最后由 夏末渐离 于 2016-1-12 12:59 编辑 
 
   手头刚好有个现成的,在此吐槽下:最近新人都这样。注意要【善于搜索】。
 复制代码/*:
 * @author XMJL
 * @param Window_Width
 * @default 200
 *
 * @param Window_Height
 * @default 100
 *
 * @param Opacity
 * @default 255
 *
 * @param Var_Id
 * @default 1
 *
 * @param ContentsX
 * @default 0
 *
 * @param ContentsY
 * @default 10
 *
 * @param Contents
 * @default var_value:
 */
(function()
{
    var parameters = PluginManager.parameters('Window_disposeVarValue');
    var mywidth=Number(parameters['Window_Width']);
    var myheight=Number(parameters['Window_Height']);
    var VariableId=Number(parameters['Var_Id']);
    var opacityValue=Number(parameters['Opacity']);
    var contents=parameters['Contents'];
    var contentsX=Number(parameters['ContentsX']);
    var contentsY=Number(parameters['ContentsY']);
    var Scene_Map20160104=Scene_Map.prototype.createAllWindows;
    Scene_Map.prototype.createAllWindows=function()
    {
        Scene_Map20160104.call(this);
        this.addChild(new Window_disposeVarValue());
    }
    function Window_disposeVarValue(){
        this.initialize.apply(this, arguments);
    }
    Window_disposeVarValue.prototype = Object.create(Window_Base.prototype);
    Window_disposeVarValue.prototype.constructor = Window_disposeVarValue;
    Window_disposeVarValue.prototype.initialize = function() {
        Window_Base.prototype.initialize.call(this, 0, 0, mywidth, myheight);
        this.opacity = opacityValue;
        this.refresh();
    };
    Window_disposeVarValue.prototype.VarValue=function()
    {
        var value=$gameVariables.value(VariableId);
        this.oldValue=value;
        return value;
    }
    Window_disposeVarValue.prototype.refresh=function()
    {
        if($gameVariables.value(VariableId)!=this.oldValue)
        {
            this.contents.clear();
            this.drawText(contents+this.VarValue(),contentsX,contentsY);
        }
    }
    Window_disposeVarValue.prototype.update=function()
    {
        this.refresh();
    }
})();
 | 
 |