SRPG Studio 14章 [無断転載禁止]©5ch.net
レス数が900を超えています。1000を超えると表示できなくなるよ。
0909名前は開発中のものです。
2016/05/23(月) 21:53:03.37ID:Y5kTl4kN見た目しか確認してないけど、ゲージ画像はランタイムの四角いほうで計算してるから変えてる人はずれるかもしれないの
行数足りないからちょくちょく改行削ってるんで適当に改行してネ
(function() {
var alias = MapLayer.drawUnitLayer;
MapLayer.drawUnitLayer = function() {
alias.call(this);
var session = root.getCurrentSession();
if (session !== null) {
MapHpBar.drawBar(session.getScrollPixelX(), session.getScrollPixelY());
}
};
var MapHpBar = {
drawBar: function(scrollX, scrollY) {
var i, unit, hp, mhp, list, count, picWidth, x, y, srcY;
var pic = root.queryUI('battle_gauge');
var width = GraphicsFormat.MAPCHIP_WIDTH;var height = GraphicsFormat.MAPCHIP_HEIGHT;
var arrList = [PlayerList.getSortieList(), AllyList.getAliveList(), EnemyList.getAliveList()];
for (i = 0; i < 3; i++) {
list = arrList[i];
count = list.getCount();
srcY = 14 * (i + 1);
for (j = 0; j < count; j++) {
unit = list.getData(j);hp = unit.getHp();mhp = ParamBonus.getMhp(unit);
picWidth = Math.ceil(14 * hp / mhp);x = unit.getMapX() * width - scrollX + 1;y = unit.getMapY() * height - scrollY + 20;
pic.drawParts(x, y, 0 ,0, 30, 12);
pic.drawParts(x + 8, y, 8, srcY, picWidth, 12);
}
}
}
};
})();
レス数が900を超えています。1000を超えると表示できなくなるよ。