sol-rui-after-mini/www/js/plugins/JsScript5Set.js
2024-01-30 18:01:34 -06:00

30 lines
839 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*:
* @plugindesc
* @author ビービー
*
* @param Center X
* @desc 画面中心点をX方向にずらす数値です。デフォルト0
* @default 0
*
* @param Center Y
* @desc 画面中心点をY方向にずらす数値です。デフォルト0
* @default 0
*
* @help
*/
var BBcenterX;
var BBcenterY;
(function() {
var parameters = PluginManager.parameters('JsScript5Set');
BBcenterX = Number(parameters['Center X'] || 0);
BBcenterY = Number(parameters['Center Y'] || 0);
var BBCSswitch = Number(parameters['Switch ID'] || 1);
Game_Player.prototype.centerX = function() {
var x = BBcenterX;
return (Graphics.width / $gameMap.tileWidth() - 1) / 2.0 + x;
};
Game_Player.prototype.centerY = function() {
var y = BBcenterY;
return (Graphics.height / $gameMap.tileHeight() - 1) / 2.0 + y;
};
})();