Advertisement
DizzyMediaInc

DMI_Fade_Control

Sep 3rd, 2017
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*:
  2.  * @plugindesc (v.1.0) Controls fade times
  3.  * @author DMI
  4.  *
  5.  *
  6.  * @param Fade In Time Map
  7.  * @desc Fade In Time | Default: 24
  8.  * @default 24
  9.  *
  10.  *
  11.  * @param Fade Out Time Map
  12.  * @desc Fade Out Time | Default: 24
  13.  * @default 24
  14.  *
  15.  *
  16.  * @param Fade In Time Transfer
  17.  * @desc Fade In Time Transfer | Default: 24
  18.  * @default 24
  19.  *
  20.  *
  21.  * @param Fade Out Time Transfer
  22.  * @desc Fade Out Time Transfer | Default: 24
  23.  * @default 24
  24.  *
  25.  *
  26.  * @help
  27.  *   DMI's Fade Control Plugin
  28.  * ===========================================================================
  29.  *
  30.  *
  31.  *      This plugin gives you control over fade times
  32.  *  
  33.  *      You are free to use this plugin for non-commercial and commercial projects
  34.  *      as long as you credit me in some way.
  35.  *
  36.  *      Credit to: Tsuyoi Raion or DMI *Dizzy Media Inc.*
  37.  *
  38.  */
  39.  ///////////////////
  40.  // Plugin Vers.  //
  41.  ///////////////////
  42.  
  43. console.log('You are currently using Vers. 1.0 of DMI Fade Control');
  44.  
  45.  ///////////////////
  46.  // Parameters    //
  47.  //////////////////
  48.  
  49.  var parameters = PluginManager.parameters('DMI_Fade_Control');
  50.  
  51.  var itemName = String(parameters['Items Name'] || "Items Name");
  52.  
  53.  var fadeInTimeMap = Number(parameters['Fade In Time Map'] || 24);
  54.  var fadeOutTimeMap = Number(parameters['Fade Out Time Map'] || 24);
  55.  
  56.  var fadeInTimeTrans = Number(parameters['Fade In Time Transfer'] || 24);
  57.  var fadeOutTimeTrans = Number(parameters['Fade Out Time Transfer'] || 24);
  58.  
  59. var pluginFadeInTimeMap = Number(parameters['Plugin Fade In Time'] || 24);
  60.  
  61.  
  62.  
  63. Game_Screen.prototype.startFadeOut = function(duration) {
  64.     this._fadeOutDuration = fadeOutTimeMap;
  65.     this._fadeInDuration = 0;
  66. };
  67.  
  68. Game_Screen.prototype.startFadeIn = function(duration) {
  69.     this._fadeInDuration = fadeInTimeMap;
  70.     this._fadeOutDuration = 0;
  71. };
  72.  
  73.  
  74. Scene_Map.prototype.fadeInForTransfer = function() {
  75.     var fadeType = $gamePlayer.fadeType();
  76.     switch (fadeType) {
  77.     case 0: case 1:
  78.         this.startFadeIn(fadeInTimeTrans, fadeType === 1);
  79.         break;
  80.     }
  81. };
  82.  
  83. Scene_Map.prototype.fadeOutForTransfer = function() {
  84.     var fadeType = $gamePlayer.fadeType();
  85.     switch (fadeType) {
  86.     case 0: case 1:
  87.         this.startFadeOut(fadeOutTimeTrans, fadeType === 1);
  88.         break;
  89.     }
  90. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement