本帖最后由 tseyik 于 2016-8-9 17:47 编辑
$gameParty._gold
參考
/* マップ画面に常駐する所持金ウィンドウを扱うクラスです */ function Window_ResidentGold() { this.initialize.apply(this, arguments); } Window_ResidentGold.prototype = Object.create(Window_Gold.prototype); Window_ResidentGold.prototype.constructor = Window_ResidentGold; Window_ResidentGold.prototype.initialize = function(x, y) { Window_Gold.prototype.initialize.call(this, x, y); this.refresh(); }; /* 描画内容の更新 */ Window_ResidentGold.prototype.refresh = function(){ this.last_gold = $gameParty.gold(); this.last_WinON = inVal.WinON; var x = this.textPadding() + RGW_paddingWidth; var y = (this.contentsHeight() - Window_Base.prototype.lineHeight() ) / 2; var icon_y = (this.contentsHeight() - Window_Base._iconWidth) / 2; var width = this.contentsWidth(); this.contents.clear(); if(RGW_type == 3){ this.drawBackground.call(this); } if(RGW_icon === 0){ this.drawCurrencyValue(this.value(), TextManager.currencyUnit, -x, y, width); }else{ this.drawText(this.value(), -x, y, this.contentsWidth(), 'right'); this.drawIcon(RGW_icon, x, icon_y); } };
/* マップ画面に常駐する所持金ウィンドウを扱うクラスです */
function Window_ResidentGold() {
this.initialize.apply(this, arguments);
}
Window_ResidentGold.prototype = Object.create(Window_Gold.prototype);
Window_ResidentGold.prototype.constructor = Window_ResidentGold;
Window_ResidentGold.prototype.initialize = function(x, y) {
Window_Gold.prototype.initialize.call(this, x, y);
this.refresh();
};
/* 描画内容の更新 */
Window_ResidentGold.prototype.refresh = function(){
this.last_gold = $gameParty.gold();
this.last_WinON = inVal.WinON;
var x = this.textPadding() + RGW_paddingWidth;
var y = (this.contentsHeight() - Window_Base.prototype.lineHeight() ) / 2;
var icon_y = (this.contentsHeight() - Window_Base._iconWidth) / 2;
var width = this.contentsWidth();
this.contents.clear();
if(RGW_type == 3){
this.drawBackground.call(this);
}
if(RGW_icon === 0){
this.drawCurrencyValue(this.value(), TextManager.currencyUnit, -x, y, width);
}else{
this.drawText(this.value(), -x, y, this.contentsWidth(), 'right');
this.drawIcon(RGW_icon, x, icon_y);
}
};
|