赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 8 |
经验 | 2307 |
最后登录 | 2023-10-22 |
在线时间 | 174 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 842
- 在线时间
- 174 小时
- 注册时间
- 2012-2-7
- 帖子
- 43
|
Window_Base.prototype.drawActorHp = function(actor, wx, wy, ww) { ww = ww || 186; var color1 = this.hpGaugeColor1(); var color2 = this.hpGaugeColor2(); if (actor.barrierPoints() > 0) {//如果有护盾,则绘制护盾状态 color1 = this.textColor(8);//如果有护盾则改变血条颜色1 color2 = this.textColor(7);//如果有护盾则改变血条颜色2 this.drawGauge(wx, wy, ww, actor.hpRate(), color1, color2); this.drawBarrierGauge(actor, wx+5, wy+45, ww);//绘制护盾图标,wx和wy是位置 }else{ this.drawGauge(wx, wy, ww, actor.hpRate(), color1, color2); } this.changeTextColor(this.systemColor()); var c1 = this.hpColor(actor); var c2 = this.normalColor(); this.drawCurrentAndMax(actor.hp, actor.mhp, wx, wy+10, ww, c1, c2); }; Window_Base.prototype.drawBarrierGauge = function(actor, wx, wy, ww) { var ph = Window_Base._iconHeight; this.drawIcon(90,wx,wy-ph); this.drawText(actor.barrierPoints(), wx, wy-ph-3, 32,'center'); }
Window_Base.prototype.drawActorHp = function(actor, wx, wy, ww) {
ww = ww || 186;
var color1 = this.hpGaugeColor1();
var color2 = this.hpGaugeColor2();
if (actor.barrierPoints() > 0) {//如果有护盾,则绘制护盾状态
color1 = this.textColor(8);//如果有护盾则改变血条颜色1
color2 = this.textColor(7);//如果有护盾则改变血条颜色2
this.drawGauge(wx, wy, ww, actor.hpRate(), color1, color2);
this.drawBarrierGauge(actor, wx+5, wy+45, ww);//绘制护盾图标,wx和wy是位置
}else{
this.drawGauge(wx, wy, ww, actor.hpRate(), color1, color2);
}
this.changeTextColor(this.systemColor());
var c1 = this.hpColor(actor);
var c2 = this.normalColor();
this.drawCurrentAndMax(actor.hp, actor.mhp, wx, wy+10, ww, c1, c2);
};
Window_Base.prototype.drawBarrierGauge = function(actor, wx, wy, ww) {
var ph = Window_Base._iconHeight;
this.drawIcon(90,wx,wy-ph);
this.drawText(actor.barrierPoints(), wx, wy-ph-3, 32,'center');
}
这是我只用的代码,只要插入YEP_AbsorptionBarrier(YEP护盾屏障的插件)代码最后就行
实际想效果如下图
|
|