コード: 全て選択
/*:
* @plugindesc ミニマップを表示
* @author free
* @help MZ MV ミニマップを表示
*/
(function () {
"use strict";
const pluginName = 'MiniMap';
var _Spriteset_Base_createUpperLayer = Spriteset_Base.prototype.createUpperLayer;
Spriteset_Base.prototype.createUpperLayer = function() {
_Spriteset_Base_createUpperLayer.apply(this, arguments);
if (this instanceof Spriteset_Map) {
this.createDrawSprite();
}
};
Spriteset_Map.prototype.createDrawSprite = function() {
var sprite = new Sprite()
for(var x = 0; x < $dataMap.width; x++){
for(var y = 0; y < $dataMap.width; y++){
sprite.bitmap = this.makeDrawBitmap(x, y);
this.addChild(sprite);
}
}
};
Spriteset_Map.prototype.makeDrawBitmap = function(x, y) {
var bitmap = new Bitmap(Graphics.boxWidth, Graphics.boxHeight);
bitmap.fillRect(x, y, 10, 10,'rgba(255, 255, 255, 0.5)');
return bitmap;
};
})();