43 lines
No EOL
1.7 KiB
JavaScript
43 lines
No EOL
1.7 KiB
JavaScript
/*:
|
|
* @plugindesc 強制的に白でフェードイン・フェードアウトを行うプラグイン
|
|
* @author みるきーうぇい
|
|
*
|
|
* @param Fade Switch ID
|
|
* @desc フェードの色を変更するスイッチのID
|
|
* @default 1
|
|
*
|
|
* @help
|
|
* このプラグインは、指定したスイッチが ON のときに
|
|
* フェードイン・フェードアウトを白色で行います。
|
|
*
|
|
* プラグインパラメータでスイッチIDを指定してください。
|
|
* スイッチが ON のときに白フェードが適用されます。
|
|
*
|
|
* プラグインコマンドは必要ありません。
|
|
*
|
|
* フェードイン/フェードアウトを行うシーンで自動的に適用されます。
|
|
*/
|
|
|
|
(function() {
|
|
// プラグインパラメータの取得
|
|
var parameters = PluginManager.parameters('MW_WhiteFade');
|
|
var fadeSwitchId = Number(parameters['Fade Switch ID'] || 1);
|
|
|
|
// Scene_Base.prototype.startFadeIn のオーバーライド
|
|
var _Scene_Base_startFadeIn = Scene_Base.prototype.startFadeIn;
|
|
Scene_Base.prototype.startFadeIn = function(duration, white) {
|
|
if ($gameSwitches.value(fadeSwitchId)) {
|
|
white = true; // スイッチがONなら強制的に白フェードイン
|
|
}
|
|
_Scene_Base_startFadeIn.call(this, duration, white);
|
|
};
|
|
|
|
// Scene_Base.prototype.startFadeOut のオーバーライド
|
|
var _Scene_Base_startFadeOut = Scene_Base.prototype.startFadeOut;
|
|
Scene_Base.prototype.startFadeOut = function(duration, white) {
|
|
if ($gameSwitches.value(fadeSwitchId)) {
|
|
white = true; // スイッチがONなら強制的に白フェードアウト
|
|
}
|
|
_Scene_Base_startFadeOut.call(this, duration, white);
|
|
};
|
|
})(); |