Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=================================================================
- // Random Loading Image v1.0
- // * This plugin allows you to use customized "Loading..." images and
- // randomize them. This was originally written specifically for "The
- // Adventures of Tryggr".
- //
- // © 2015, Companion Wulf
- //
- //=================================================================
- // RandomLoadingImage.js
- //=================================================================
- /*:
- * @plugindesc Changes the default "Loading..." image to a random one.
- * @author Companion Wulf
- *
- * @param Number of Images
- * @desc The total number of "Loading" images used.
- * @default 3
- *
- * @help
- * Images must be named in sequence: Loading1, Loading2, etc.
- *
- * Set "Number of Images" to the total number of "Loading" images you've
- * used (excluding the default).
- *
- * There are no plugin commands.
- *
- * This plugin is free to use under CC BY-SA 4.0, but please refer to the
- * RPG Maker Times blogsite for other details.
- *
- */
- (function() {
- var parameters = PluginManager.parameters('RandomLoadingImage');
- var numberImages = Number(parameters['Number of Images']);
- // Doesn't seem to work properly aliased, so overwritten
- SceneManager.initGraphics = function() {
- var randomImage = (Math.floor(Math.randomInt(numberImages) + 1));
- var type = this.preferableRendererType();
- Graphics.initialize(this._screenWidth, this._screenHeight, type);
- Graphics.boxWidth = this._boxWidth;
- Graphics.boxHeight = this._boxHeight;
- Graphics.setLoadingImage('img/system/Loading'+randomImage+'.png');
- if (Utils.isOptionValid('showfps')) { Graphics.showFps(); }
- if (type === 'webgl') { this.checkWebGL(); }
- };
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement