//============================================================================= // mcs_biggerweapons.js //============================================================================= /*: * @plugindesc Use bigger Weapons in SV Battlesystem 1.0.1 * @author Florian Strasser * www.florian-strasser.de * * @param width * @desc Define the width of each frame * @default 96 * @help Define the width of each frame * * @param heigth * @desc Define the width of each frame * @default 64 * @help Define the width of each frame * * @param anchor_x * @desc Define the anchor_x * @default 0.5 * @help Define the anchor_x * * @param anchor_y * @desc Define the anchor_y * @default 1.0 * @help Define the anchor_y */ var parameters = PluginManager.parameters('mcs_biggerweapons'); var width = String(parameters['width'] || 96); var heigth = String(parameters['heigth'] || 64); var anchor_x = String(parameters['anchor_x'] || 0.5); var anchor_y = String(parameters['anchor_y'] || 1.0); (function() { Sprite_Weapon.prototype.initMembers = function() { this._weaponImageId = 0; this._animationCount = 0; this._pattern = 0; this.anchor.x = anchor_x; this.anchor.y = anchor_y; this.x = 0; }; Sprite_Weapon.prototype.updateFrame = function() { if (this._weaponImageId > 0) { var index = (this._weaponImageId - 1) % 12; var w = width; var h = heigth; var sx = (Math.floor(index / 6) * 3 + this._pattern) * w; var sy = Math.floor(index % 6) * h; this.setFrame(sx, sy, w, h); } else { this.setFrame(0, 0, 0, 0); } }; })();