sakura-gozen/js/plugins/iii/iiiBattleScreenEffect.js
2025-02-19 10:16:07 -06:00

81 lines
2.4 KiB
JavaScript

//=============================================================================
// IIISaveInfoEx.js
// ----------------------------------------------------------------------------
// (C) 2022 ズワイKANI
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
/*:ja
* @target MZ
* @author KANI
* @plugindesc スクリーン演出用
*
* @help
* スクリーンフェード演出用🦑🦀🦑。
*
* @command fadeout
* @text フェードアウト
* @arg duration
* @text フェード時間
* @description 画面をいっぱい隠す時間
* @type number
* @default 60
*
* @arg color
* @text フェードする色
* @description カラーコード
* @type string
* @default #000000
*
* @command fadein
* @text フェードイン
* @arg duration
* @text フェード時間
* @description 画面をいっぱい消す時間
* @type number
* @default 60
*
*
*/
(() => {
"use strict";
const script = document.currentScript;
const pluginParam = PluginManagerEx.createParameter(script);
const tw = Torigoya.FrameTween;
const twe = Torigoya.FrameTween.Easing;
PluginManagerEx.registerCommand(document.currentScript, "fadeout", (args) => {
var bitmap = new Bitmap(Graphics.width, Graphics.height); ///ImageManager.loadPicture('EV_Red');
bitmap.fillRect(0, 0, bitmap.width, bitmap.height, args.color);
var sprite = new Sprite(bitmap);
tw.create(sprite, { opacity: 0 })
.to({ opacity: 255 }, args.duration)
.start();
SceneManager._scene.addChild(sprite);
});
PluginManagerEx.registerCommand(document.currentScript, "fadein", (args) => {
var sprite =
SceneManager._scene.children[SceneManager._scene.children.length - 1];
tw.create(sprite, { opacity: 255 })
.to({ opacity: 0 }, args.duration)
.start();
});
/*
function screenout(){
var bitmap = ImageManager.loadPicture('EV_Red');
var sprite = new Sprite(bitmap);
SceneManager._scene.addChild(sprite);
}:
function screendeleat(){
var sprite = SceneManager._scene.children[SceneManager._scene.children.length-1];
const tw = Torigoya.FrameTween;
const twe = Torigoya.FrameTween.Easing;
tw.create(sprite).to({opacity:0}, 10).start();
};
*/
})();