赞 | 3 |
VIP | 12 |
好人卡 | 0 |
积分 | 3 |
经验 | 9192 |
最后登录 | 2023-6-10 |
在线时间 | 312 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 262
- 在线时间
- 312 小时
- 注册时间
- 2010-8-2
- 帖子
- 355
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
/* 图标重绘 */ Window_Base.prototype._drawIcon = function(iconIndex, x, y,w,h) { var bitmap = ImageManager.loadSystem('IconSet'); var pw = Window_Base._iconWidth; var ph = Window_Base._iconHeight; var sx = iconIndex % 16 * pw; var sy = Math.floor(iconIndex / 16) * ph; this.contents.blt(bitmap, sx, sy, pw, ph, x, y,w,h); }; /**绘制状态图标 */ Window_Base.prototype._drawActorIcons = function(actor, x, y, width,w,h) { width = width || 144; var $icons = actor.allIcons().slice(0, Math.floor(width / Window_Base._iconWidth)); for (var i = 0; i < icons.length; i++) { this._drawIcon(icons[i], x + Window_Base._iconWidth * i, y,w,h); } }; /* 窗口处理模块 */ map_statu.prototype.update = function() { Window.prototype.update.call(this); var actor = $gameActors.actor(1); this.updateTone(); this.updateOpen(); this.updateClose(); this.updateBackgroundDimmer(); //this.drawActorFace($gameActors.actor(1), 0, 0, 100, 100); this._drawFace(actor.faceName(), actor.faceIndex(), 0, 0, 144, 144,50,50); this._drawActorHp($gameActors.actor(1),50,0,150); this._drawActorMp($gameActors.actor(1),50,30,150); this._drawActorName($gameActors.actor(1),0,60); this._drawActorIcons(actor,55,50,144,18,18); };
/*
图标重绘
*/
Window_Base.prototype._drawIcon = function(iconIndex, x, y,w,h) {
var bitmap = ImageManager.loadSystem('IconSet');
var pw = Window_Base._iconWidth;
var ph = Window_Base._iconHeight;
var sx = iconIndex % 16 * pw;
var sy = Math.floor(iconIndex / 16) * ph;
this.contents.blt(bitmap, sx, sy, pw, ph, x, y,w,h);
};
/**绘制状态图标 */
Window_Base.prototype._drawActorIcons = function(actor, x, y, width,w,h) {
width = width || 144;
var $icons = actor.allIcons().slice(0, Math.floor(width / Window_Base._iconWidth));
for (var i = 0; i < icons.length; i++) {
this._drawIcon(icons[i], x + Window_Base._iconWidth * i, y,w,h);
}
};
/*
窗口处理模块
*/
map_statu.prototype.update = function() {
Window.prototype.update.call(this);
var actor = $gameActors.actor(1);
this.updateTone();
this.updateOpen();
this.updateClose();
this.updateBackgroundDimmer();
//this.drawActorFace($gameActors.actor(1), 0, 0, 100, 100);
this._drawFace(actor.faceName(), actor.faceIndex(), 0, 0, 144, 144,50,50);
this._drawActorHp($gameActors.actor(1),50,0,150);
this._drawActorMp($gameActors.actor(1),50,30,150);
this._drawActorName($gameActors.actor(1),0,60);
this._drawActorIcons(actor,55,50,144,18,18);
};
map_statu是window_base的子类,我把绘制状态的方法重写了一下,然后放到update里边,为什么增加状态时候能直接显示,而移除状态时候就不能
移除状态时候得切一下菜单,然后切回来,那个移除的状态才会消失 |
|