//スクリプト--------
(function() {
MapHpDecorator._setupDecorationFromType = function(type) {
var obj = root.getHpDecoration(type);
var pos = this._getPos();
var width = 28;//バーの幅、初期値32
var height = 5;//高さ、初期値10
var color = this._getColor(type);
var alpha = this._getAlpha(type);
var strokeColor = 0xff;
var strokeAlpha = 255;
var hpType = EnvironmentControl.getMapUnitHpType();
//HPバーと数値の位置調整
var dx = 0;
var dy = 6;
obj.beginDecoration();
if (hpType === 0) {
// addRectangleを呼び出す前に色と輪郭を設定しておく
obj.setFillColor(color, alpha);
obj.setStrokeInfo(strokeColor, strokeAlpha, 1, true);
obj.addRectangle(pos.x + dx, pos.y + dy, width, height);
obj.addHp(pos.x + dx, pos.y + dy, this._getNumberColorIndex(hpType));
}
else if (hpType === 1) {
obj.addGauge(pos.x, pos.y, 1);
}
obj.endDecoration();
};
})();