let _cinMaxFlame = 0; let _cinImg = ""; let _cinSpeed = 0; let _cinFlame = 0; let _cinPosX = 0; let _cinPosY = 0; let _cinYMY = 0; let _cinLoopX = 0; Game_Interpreter.prototype.CutInSet = function (_flame, _speed, _ImgStr, _pLoopX, _YPos, _YMY) { _YPos = typeof _YPos !== 'undefined' ? _YPos : 405; _YMY = typeof _YMY !== 'undefined' ? _YMY : 100; _cinSpeed = _speed; _cinMaxFlame = _flame + 20; _cinLoopX = _pLoopX; _cinImg = _ImgStr; _cinPosX = 0; _cinPosY = _YPos; _cinYMY = _YMY; _cinFlame = 0; } let NS_CutIn_Update = Game_Interpreter.prototype.NUpdate; Game_Interpreter.prototype.NUpdate = function () { NS_CutIn_Update.call(this); if (_cinFlame < _cinMaxFlame) { if (_cinFlame >= _cinMaxFlame - 10) { let _opi = ((_cinMaxFlame - _cinFlame) / 10) * 255; let _MY = (_cinMaxFlame - _cinFlame) * 10; this.SetSpriteC(PN_CBack, _cinImg, -_cinPosX, _cinPosY, _opi, 100, _MY); } else { let _opi = (_cinFlame / 10) * 255; if (_opi > 255) _opi = 255; let _MY = _cinFlame * 10; if (_MY > 100 * (_cinYMY / 100)) _MY = 100 * (_cinYMY / 100); this.SetSpriteC(PN_CBack, _cinImg, -_cinPosX, _cinPosY, _opi, 100, _MY); _cinPosX += _cinSpeed; if (_cinLoopX < _cinPosX) _cinPosX = _cinPosX - _cinLoopX; } _cinFlame++; if (_cinFlame == _cinMaxFlame) this.DelSprite(PN_CBack); } }