设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2274|回复: 3
打印 上一主题 下一主题

[交流讨论] MOG的MOG - Battle Transitions

[复制链接]

Lv2.观梦者

梦石
0
星屑
350
在线时间
109 小时
注册时间
2016-1-17
帖子
93
跳转到指定楼层
1
发表于 2017-7-27 08:03:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
切入战斗的特效,很赞,是不是很占内存?随机到 Noise效果立马卡死,是不是我该换电脑了?

Lv2.观梦者

梦石
0
星屑
350
在线时间
109 小时
注册时间
2016-1-17
帖子
93
2
 楼主| 发表于 2017-7-27 08:20:16 | 只看该作者
  1. /=============================================================================
  2. // MOG_BattleTransitions.js
  3. //=============================================================================

  4. /*:
  5. * @plugindesc (v1.3) Novas transições de batalha.
  6. * @author Moghunter
  7. *
  8. * @param Default Transition
  9. * @desc Definição da transição padrão.
  10. * (-1 = Default) (0..4 New Trasitions) (4 = Random)
  11. *
  12. * @default 4
  13. *
  14. * @help  
  15. * =============================================================================
  16. * +++ MOG - Battle Transitions(v1.3) +++
  17. * By Moghunter
  18. * https://atelierrgss.wordpress.com/
  19. * =============================================================================
  20. * Adiciona novas transições de batalha.
  21. *
  22. * =============================================================================
  23. * PLUGIN COMMAND
  24. * =============================================================================
  25. * Use o comando abaixo para definir uma transição.
  26. *
  27. * transition_effect : X
  28. *
  29. * X - Tipo de transição.
  30. *
  31. * -1 = Default.
  32. *  0 = Shatter 1.
  33. *  1 = Shatter 2.
  34. *  2 = Blur.
  35. *  3 = Noise.
  36. *  4 = Random.
  37. *
  38. * EG
  39. *
  40. * transition_effect : 3
  41. *
  42. * =============================================================================
  43. * HISTÓRICO
  44. * =============================================================================
  45. * v1.3 - Melhoria na compatibilidade de third party plugins.
  46. * v1.2 - Compatibilidade com pixi V4.
  47. * v1.1 - Melhoria nas animações.
  48. */

  49. //=============================================================================
  50. // ** PLUGIN PARAMETERS
  51. //=============================================================================
  52.   var Imported = Imported || {};
  53.   Imported.MOG_BattleTransitions = true;
  54.   var Moghunter = Moghunter || {};

  55.     Moghunter.parameters = PluginManager.parameters('MOG_BattleTransitions');
  56.         Moghunter.btrEffectsDefault = Number(Moghunter.parameters['Default Transition'] || 4);

  57. //=============================================================================
  58. // ** Game_Interpreter
  59. //=============================================================================       

  60. //==============================
  61. // * PluginCommand
  62. //==============================
  63. var _mog_trefct_pluginCommand = Game_Interpreter.prototype.pluginCommand
  64. Game_Interpreter.prototype.pluginCommand = function(command, args) {
  65.         _mog_trefct_pluginCommand.call(this,command, args)
  66.         if (command === "transition_effect")  {
  67.                 var type = Math.min(Math.max(args[1], -1),4);
  68.             $gameSystem._treType[1] = type;
  69.         };
  70.         return true;
  71. };

  72. //=============================================================================
  73. // ** Game System
  74. //=============================================================================

  75. //==============================
  76. // * Initialize
  77. //==============================
  78. var _mog_trefct_initialize = Game_System.prototype.initialize;
  79. Game_System.prototype.initialize = function() {
  80.         _mog_trefct_initialize.call(this);
  81.         this._treSpriteData = null;
  82.         this._treType = [0,Moghunter.btrEffectsDefault];       
  83.         this.trefctClear();
  84.         this._treCP = false;
  85. };

  86. //==============================
  87. // * trefctClear
  88. //==============================
  89. Game_System.prototype.trefctClear = function() {
  90.     this._trefctData = [false,0,0,0];
  91. };

  92. //==============================
  93. // * set Transition R
  94. //==============================
  95. Game_System.prototype.setTransitionR = function() {
  96.     if (this._treType[1] >= 4) {   
  97.            this._treType[0] = Math.randomInt(4);
  98.     } else {
  99.            this._treType[0] = this._treType[1];
  100.     };
  101.         return this._treType[0];
  102. };

  103. //=============================================================================
  104. // ** SceneManager
  105. //=============================================================================

  106. //==============================
  107. // * Need Transition
  108. //==============================
  109. SceneManager.needTrasition = function() {
  110.    if (BattleManager.isBattleTest()) {return false};
  111.    if (!$gameSystem) {return false};
  112.    if (!$gameSystem._trefctData[0]) {return false};   
  113.    if ($gameSystem._treCP) {return false};
  114.    return true;
  115. };

  116. //==============================
  117. // * setTR Bitmap
  118. //==============================
  119. SceneManager.setTRBitmap = function(bitmap) {
  120.      this._trbitmap = bitmap;
  121. };

  122. //==============================
  123. // * setTR Bitmap
  124. //==============================
  125. SceneManager.TRBitmap = function() {
  126.      return this._trbitmap;
  127. };

  128. //=============================================================================
  129. // ** Scene Base
  130. //=============================================================================

  131. //==============================
  132. // * TRS Data
  133. //==============================
  134. Scene_Base.prototype.trsData = function() {
  135.      return $gameSystem._trefctData;
  136. };

  137. //==============================
  138. // * TRS Data
  139. //==============================
  140. Scene_Base.prototype.trsType = function() {
  141.      return Number(this.trsData()[1]);
  142. };

  143. //==============================
  144. // * TRS Data
  145. //==============================
  146. Scene_Base.prototype.trsPhase = function() {
  147.      return Number(this.trsData()[3]);
  148. };

  149. //==============================
  150. // * Tr Filter
  151. //==============================
  152. Scene_Base.prototype.trfilter = function() {       
  153.     return this._spriteTrasition[0].filters[0];
  154. };

  155. //==============================
  156. // * clearTREffects
  157. //==============================
  158. Scene_Base.prototype.clearTREffects = function() {
  159.         if (this.trsPhase() === 1) {this.removeTRSprites()};
  160.         this._TRblackScreenD = 2;
  161.         this._encounterEffectDuration = 0;
  162.         $gameSystem.trefctClear();
  163. };

  164. //==============================
  165. // * removeTRSprites
  166. //==============================
  167. Scene_Base.prototype.removeTRSprites = function() {
  168.         if ($gameSystem._trefctData[3] === 1) {$gameSystem._treCP = true};
  169.         $gameSystem._trefctData[3] = 0;       
  170.         for (var i = 0; i < this._spriteTrasition.length; i++) {
  171.            this.removeChild(this._spriteTrasition[i]);
  172.            this._spriteTrasition[i] = null;
  173.         };       
  174.         this._spriteTrasition = null;
  175.         this._bitmapTransition = null;
  176.         if (this._spriteset && this._preTRFilters) {
  177.                 this._spriteset.filters = this._preTRFilters;
  178.         };
  179.         if (this._dummyTR) {
  180.                 this.removeChild(this._dummyTR);
  181.             this._dummyTR = null;
  182.         };
  183.         if (this._dummyTR2) {
  184.                 this.removeChild(this._dummyTR2);
  185.             this._dummyTR2 = null;
  186.         };       
  187.         for (var i = 0; i < $gameSystem._treSpriteData.length; i++) {
  188.                 $gameSystem._treSpriteData[i] = null;
  189.         };       
  190.         $gameSystem._treSpriteData = null;
  191.     if (Imported.MOG_BattleCry) {
  192.            var actor = BattleManager.randomActor();
  193.        if (actor) {SoundManager.selectVoice(actor._v_start)};
  194.     };       
  195. };

  196. //==============================
  197. // * create TR Bitmap
  198. //==============================
  199. Scene_Base.prototype.createTRBitmap = function() {       
  200.    this._fadeDuration = 0;
  201.    if (this._fadeSprite) {this._fadeSprite.opacity = 0};
  202.    if (this.trsPhase() === 0) {             
  203.            if (!$dataMap.specifyBattleback) {
  204.                this._spriteset.hideCharacters();
  205.            };
  206.            this.snapForBattleBackground();
  207.        SceneManager.setTRBitmap(SceneManager.snap());
  208.    };
  209.    if (SceneManager.TRBitmap()) {
  210.            this._bitmapTransition = SceneManager.TRBitmap();
  211.    } else {
  212.        this._bitmapTransition = SceneManager.snap();
  213.    };
  214.    this.createTRDummyBitmap();
  215. };
  216.        
  217. //==============================
  218. // * create TR Dummy Bitmap
  219. //==============================
  220. Scene_Base.prototype.createTRDummyBitmap = function() {
  221.    this._dummyTR = new Sprite(new Bitmap(Graphics.boxWidth,Graphics.boxHeight));
  222.    this._dummyTR.bitmap.fillAll('black');
  223.    this.addChild(this._dummyTR);
  224. };

  225. //==============================
  226. // * create TR Black Screen
  227. //==============================
  228. Scene_Base.prototype.createTRBlackScreen = function() {
  229.    this._dummyTR2 = new Sprite(new Bitmap(Graphics.boxWidth,Graphics.boxHeight));
  230.    this._dummyTR2.bitmap.fillAll('black');
  231.    this.addChild(this._dummyTR2);
  232.    this._dummyTR2.opacity = this.trsPhase() === 0 ? 0 : 255;
  233.    this._TRblackScreenD = 2;
  234. };

  235. //==============================
  236. // * Setup Transition
  237. //==============================
  238. Scene_Base.prototype.setupTrasition = function() {
  239.     this.getDataTransition();
  240.         if ($gameSystem._treSpriteData) {this.loadTRPreData();return};
  241.     if (this.trsType() === 0 || this.trsType() === 1) {
  242.                 this.setupTRShatter();
  243.         } else if (this.trsType() === 2) {
  244.         this.setupTRBlur();
  245.     } else if (this.trsType() === 3) {
  246.                 this.setupTRNoise();
  247.         } else if (this.trsType() === 4) {
  248.                 this.setupTRDoubleSlide();               
  249.         };
  250.         if (this.needTRcreateBlackScreen()) {
  251.                 this.createTRBlackScreen();
  252.                 this._TRblackScreenD = 75;
  253.         };       
  254. };

  255. //==============================
  256. // * need TR Create Bk Screen
  257. //==============================
  258. Scene_Base.prototype.needTRcreateBlackScreen = function() {
  259.         if (this.trsType() === 2) {return true};
  260.         return false;
  261. };

  262. //==============================
  263. // * need TR Load Filter
  264. //==============================
  265. Scene_Base.prototype.needTRLoadFilter = function() {
  266.         if (!this._spriteset) {return false};
  267.         if (this.trsType() === 2) {return true};
  268.         if (this.trsType() === 3) {return true};
  269.         if (this.trsType() === 4) {return true};
  270.         return false;
  271. };

  272. //==============================
  273. // * get Data Transition
  274. //==============================
  275. Scene_Base.prototype.getDataTransition = function() {
  276.         this._trData = [0,0,0,0,0,0];
  277.         this._trData[0] = this._bitmapTransition.width;
  278.         this._trData[1] = this._bitmapTransition.height;
  279.         this._trData[2] = this._bitmapTransition.width / 2;
  280.         this._trData[3] = this._bitmapTransition.height / 2;
  281.         this._trData[4] = this.trsPhase() === 0 ? 10 : 0;
  282.         this._trData[5] = 0;
  283.         this._spriteTrasition = [];
  284. };       

  285. //==============================
  286. // * Execute Transition Effect
  287. //==============================
  288. Scene_Base.prototype.executeTransitionEffect = function() {
  289.         if (this._spriteset) {this._spriteset.update()};
  290.         if (!this._bitmapTransition) {this.createTRBitmap()};
  291.         if (!this._bitmapTransition.isReady()) {return};               
  292.     if (!this._spriteTrasition) {this.setupTrasition()};
  293.         this.updateTransitionEffects();
  294. };

  295. //==============================
  296. // * Setup TRSimpleSlide
  297. //==============================
  298. Scene_Base.prototype.setupTRSimpleSlide = function() {               
  299.     this._spriteTrasition[0] = new Sprite(this._bitmapTransition);
  300.         this._spriteTrasition[0].scX = Graphics.boxWidth;
  301.         this._spriteTrasition[0].speed = Math.floor(this._spriteTrasition[0].scX / 90) + 1;
  302.         this.addChild(this._spriteTrasition[0]);
  303. };
  304.        
  305. //==============================
  306. // * Setup TRDoubleSlide
  307. //==============================
  308. Scene_Base.prototype.setupTRDoubleSlide = function() {       
  309.         for (var i = 0; i < 2; i++) {
  310.                 this._spriteTrasition[i] = new Sprite(this._bitmapTransition);
  311.                 this._spriteTrasition[i].scX = Graphics.boxWidth;
  312.                 this._spriteTrasition[i].speed = Math.floor(this._spriteTrasition[i].scX / 180) + 1;
  313.                 this._spriteTrasition[i].setFrame(this._trData[2] * i,0,this._trData[2],this._trData[1]);
  314.                 this._spriteTrasition[i].x = this._trData[2] * i;               
  315.                 this.addChild(this._spriteTrasition[i]);
  316.         };
  317.          for (var i = 0; i < 5; i++) {
  318.               this.updateTRDoubleSlide()
  319.          };
  320.          this._trData[4] = 1;
  321.          this._trData[5] = 40;       
  322.        
  323. };

  324. //==============================
  325. // * Setup TRPixilate
  326. //==============================
  327. Scene_Base.prototype.setupTRNoise = function() {       
  328.      this._spriteTrasition[0] = new Sprite(this._bitmapTransition);
  329.          this._spriteTrasition[0].duration = 0;
  330.          this.addChild(this._spriteTrasition[0]);
  331.          var filter = new PIXI.filters.NoiseFilter();
  332.          filter.noise = 0;
  333.          this._spriteTrasition[0].filters = [filter];         
  334.          if (this._spriteset) {this._spriteset.filters = [filter];};
  335.          this._trData[4] = 90;
  336. };                       
  337.        
  338. //==============================
  339. // * Setup TRBlur
  340. //==============================
  341. Scene_Base.prototype.setupTRBlur = function() {       
  342.      this._spriteTrasition[0] = new Sprite(this._bitmapTransition);
  343.          this._spriteTrasition[0].duration = 0;
  344.          this.addChild(this._spriteTrasition[0]);
  345.          var filter = new PIXI.filters.BlurFilter();
  346.          filter.blurX = 0;
  347.          filter.blurY = 0;         
  348.          this._spriteTrasition[0].filters = [filter];         
  349.          if (this._spriteset) {this._spriteset.filters = [filter];};
  350.          this._trData[4] = 90;
  351. };

  352. //==============================
  353. // * Setup TR Shatter
  354. //==============================
  355. Scene_Base.prototype.setupTRShatter = function() {            
  356.          var frag_size = 32;
  357.          for (var i = 0; i < 3000; i++) {
  358.                  this._spriteTrasition[i] = new Sprite(this._bitmapTransition);
  359.                  var l = Math.floor((i * frag_size) / this._bitmapTransition.width);
  360.                  var x = Math.floor(i * frag_size) - Math.floor(l * this._bitmapTransition.width);
  361.                  var y = Math.floor(l * frag_size);
  362.                  this._spriteTrasition[i].x = x + Math.floor(frag_size / 2);
  363.                  this._spriteTrasition[i].y = y + Math.floor(frag_size / 2);                 
  364.                  this._spriteTrasition[i].anchor.x = 0.5;
  365.                  this._spriteTrasition[i].anchor.y = 0.5;
  366.                  this._spriteTrasition[i].sx = (Math.random() * 2) + 3;
  367.                  this._spriteTrasition[i].sy = (Math.random() * 1.5) + 3;
  368.                  this._spriteTrasition[i].op = Math.randomInt(3) + 3;
  369.                  this._spriteTrasition[i].init = Math.randomInt(20)
  370.                  this._spriteTrasition[i].rot = (Math.random() * 0.001) + 0.001;
  371.                  this._spriteTrasition[i].setFrame(x,y,frag_size,frag_size);
  372.                  if (this.trsType() === 1) {
  373.                          this._spriteTrasition[i].init = Math.randomInt(40)
  374.                          var d = Math.randomInt(2);
  375.                      this._spriteTrasition[i].sx = d === 0 ? this._spriteTrasition[i].sx : -this._spriteTrasition[i].sx;
  376.                          this._spriteTrasition[i].rot = this._spriteTrasition[i].sx > 0 ? this._spriteTrasition[i].rot : -this._spriteTrasition[i].rot;
  377.              };
  378.                  this.addChild(this._spriteTrasition[i]);
  379.                  if (this._spriteTrasition[i].y > this._bitmapTransition.height) {i = 3001};
  380.          };
  381.          for (var i = 0; i < 5; i++) {
  382.               this.updateTRShatter2()
  383.          };
  384.          this._trData[4] = 1;
  385.          this._trData[5] = 40;
  386. };               
  387.        
  388. //==============================
  389. // * Update TR Noise
  390. //==============================
  391. Scene_Base.prototype.updateTRNoise = function() {
  392.         this._spriteTrasition[0].duration ++;
  393.         if (this._spriteTrasition[0].duration >= 90) {
  394.                 this.trfilter().noise -= 0.01;
  395.                 this._spriteTrasition[0].opacity -= 5;
  396.         } else {
  397.                 this.trfilter().noise += 0.01;
  398.         };
  399.         if (this.trfilter().noise <= 0) {
  400.             this.trfilter().noise = 0;       
  401.                 this.clearTREffects();
  402.         };
  403. };
  404.        
  405. //==============================
  406. // * Update TR Blur
  407. //==============================
  408. Scene_Base.prototype.updateTRBlur = function() {
  409.         this._spriteTrasition[0].duration ++;
  410.         if (this._spriteTrasition[0].duration >= 90) {
  411.                 this.trfilter().blurX -= 8;
  412.                 this._spriteTrasition[0].opacity -= 5;
  413.         } else {
  414.                 this.trfilter().blurX += 8;
  415.         };
  416.         if (this.trfilter().blurX <= 0) {
  417.             this.trfilter().blurX = 0;       
  418.                 this.clearTREffects();
  419.         };
  420. };       
  421.        
  422. //==============================
  423. // * Update TR Shatter 1
  424. //==============================
  425. Scene_Base.prototype.updateTRShatter1 = function() {
  426.         var trdone = true;
  427.         for (var i = 0; i < this._spriteTrasition.length; i++) {
  428.                  this._spriteTrasition[i].init ++;
  429.                  if (this._spriteTrasition[i].init < 60) {
  430.                          this._spriteTrasition[i].x += this._spriteTrasition[i].sx;
  431.                  } else if (this._spriteTrasition[i].init < 90) {
  432.                          this._spriteTrasition[i].x -= this._spriteTrasition[i].sx * 3;
  433.                          this._spriteTrasition[i].rotation += 0.1;
  434.                  } else {
  435.                          this._spriteTrasition[i].x -= this._spriteTrasition[i].sx * 4;
  436.                          this._spriteTrasition[i].rotation += 0.1;
  437.                          this._spriteTrasition[i].opacity -= this._spriteTrasition[i].op;
  438.                  };
  439.                  if (this._spriteTrasition[i].x > 0) {trdone = false};  
  440.         };
  441.         if (trdone) {this.clearTREffects()};
  442. };
  443.        
  444. //==============================
  445. // * Update TR Shatter 2
  446. //==============================
  447. Scene_Base.prototype.updateTRShatter2 = function() {
  448.         var trdone = true;
  449.         for (var i = 0; i < this._spriteTrasition.length; i++) {
  450.                  this._spriteTrasition[i].init ++;
  451.                  if (this._spriteTrasition[i].sx > 0) {
  452.                     this._spriteTrasition[i].sx -= 0.05;
  453.              } else if (this._spriteTrasition[i].sx < 0) {
  454.                     this._spriteTrasition[i].sx += 0.05;
  455.          };
  456.          this._spriteTrasition[i].x += this._spriteTrasition[i].sx;
  457.                  if (this._spriteTrasition[i].init < 60) {
  458.                         this._spriteTrasition[i].y -= this._spriteTrasition[i].sy;
  459.                  } else if (this._spriteTrasition[i].init < 90) {
  460.                         this._spriteTrasition[i].y += this._spriteTrasition[i].sy * 2;
  461.                         this._spriteTrasition[i].rotation -= this._spriteTrasition[i].rot;
  462.                  } else {
  463.                         this._spriteTrasition[i].y += this._spriteTrasition[i].sy * 2;
  464.                         this._spriteTrasition[i].opacity -= this._spriteTrasition[i].op;
  465.                  };       
  466.                  if (this._spriteTrasition[i].opacity > 0) {trdone = false};  
  467.         };
  468.         if (trdone) {this.clearTREffects()};
  469. };       
  470.        
  471. //==============================
  472. // * update TR Simple Slide
  473. //==============================
  474. Scene_Base.prototype.updateTRSimpleSlide = function() {
  475.     this._spriteTrasition[0].x += this._spriteTrasition[0].speed;
  476.         if (this._spriteTrasition[0].x > this._spriteTrasition[0].scX + 16) {this.clearTREffects()};
  477. };

  478. //==============================
  479. // * update TR Double Slide
  480. //==============================
  481. Scene_Base.prototype.updateTRDoubleSlide = function() {
  482.     this._spriteTrasition[0].x -= this._spriteTrasition[0].speed;
  483.         this._spriteTrasition[1].x += this._spriteTrasition[1].speed;
  484.            if (this._spriteTrasition[0].x < -(this._trData[2] + 16)) {this.clearTREffects()};
  485. };


  486. //==============================
  487. // * Update TR Phase One
  488. //==============================
  489. Scene_Base.prototype.updateTRPhaseOne = function() {
  490.         this._trData[4] --
  491.         if (this._trData[4] <= 0) {this.prepareTRSecondPhase();};
  492. };

  493. //==============================
  494. // * Prepare TR Second Phase
  495. //==============================
  496. Scene_Base.prototype.prepareTRSecondPhase = function() {
  497.         $gameSystem._treSpriteData = [];
  498.         for (var i = 0; i < this._spriteTrasition.length; i++) {
  499.                 this.trRecordData(i);               
  500.         };
  501.         this.clearTREffects();
  502.         $gameSystem._trefctData[3] = 1;
  503. };

  504. //==============================
  505. // * Prepare TR record Data
  506. //==============================
  507. Scene_Base.prototype.trRecordData = function(i) {
  508.      $gameSystem._treSpriteData[i] = this._spriteTrasition[i];
  509. };

  510. //==============================
  511. // * Load TR pre DAta
  512. //==============================
  513. Scene_Base.prototype.loadTRPreData = function() {
  514.         for (var i = 0; i < $gameSystem._treSpriteData.length; i++) {
  515.                 this._spriteTrasition[i] = $gameSystem._treSpriteData[i];
  516.                 this.addChild(this._spriteTrasition[i]);
  517.         };
  518.         if (this.needTRcreateBlackScreen()) {this.createTRBlackScreen();};
  519.         if (this.needTRLoadFilter()) {this._spriteset.filters = this._spriteTrasition[0].filters;};
  520. };

  521. //==============================
  522. // * Load TR pre DAta
  523. //==============================
  524. Scene_Base.prototype.updateTRBlackScreen = function() {
  525.    if (this._TRblackScreenD > 0) {this._TRblackScreenD--;return};
  526.    if (this.trsPhase() === 0) {
  527.       this._dummyTR2.opacity += 18;
  528.    } else {
  529.           this._dummyTR2.opacity -= 18;
  530.    };
  531. };

  532. //==============================
  533. // * Update Transition Effect
  534. //==============================
  535. Scene_Base.prototype.updateTransitionEffects = function() {
  536.         if (this.trsPhase() === 1) {this._dummyTR.opacity -= 3;
  537.             if (this._dummyTR.opacity > 150) {return}
  538.         } ;       
  539.         if (this._trData[5] > 0) {this._trData[5] --;
  540.            if (this._trData[5] === 0) {this.prepareTRSecondPhase();}
  541.            return
  542.         };
  543.     if (this.trsType() === 0) {
  544.                 this.updateTRShatter1();
  545.         } else if (this.trsType() === 1) {
  546.                 this.updateTRShatter2();
  547.     } else if (this.trsType() === 2) {
  548.                 this.updateTRBlur();
  549.         } else if (this.trsType() === 3) {
  550.                 this.updateTRNoise();
  551.         } else if (this.trsType() === 5) {
  552.                 this.updateTRDoubleSlide();               
  553.                        
  554.         };
  555.         if (this._trData[4] > 0) {this.updateTRPhaseOne()};
  556.         if (this._dummyTR2) {this.updateTRBlackScreen()};
  557. };

  558. //=============================================================================
  559. // ** Scene Map
  560. //=============================================================================

  561. //==============================
  562. // * Initialize
  563. //==============================
  564. var _mog_trefct_scmap_initialize = Scene_Map.prototype.initialize;
  565. Scene_Map.prototype.initialize = function() {
  566.         _mog_trefct_scmap_initialize.call(this);
  567.         $gameSystem.trefctClear();
  568. };

  569. //==============================
  570. // * Initialize
  571. //==============================
  572. var _mog_trefct_scmap_create = Scene_Map.prototype.create;
  573. Scene_Map.prototype.create = function() {
  574.         _mog_trefct_scmap_create.call(this);
  575.     $gameSystem._treCP = false;
  576. };

  577. //==============================
  578. // * Update
  579. //==============================
  580. var _mog_trefct_scmap_update = Scene_Map.prototype.update;
  581. Scene_Map.prototype.update = function() {
  582.         if (SceneManager.needTrasition()) {this.executeTransitionEffect();return};
  583.         _mog_trefct_scmap_update.call(this);
  584. };

  585. //==============================
  586. // * start Encounter Effect
  587. //==============================
  588. var _mog_tre_scmap_startEncounterEffect = Scene_Map.prototype.startEncounterEffect;
  589. Scene_Map.prototype.startEncounterEffect = function() {
  590.    this.setTRType();
  591.    if ($gameSystem._treType[0] >= 0) {
  592.            this._encounterEffectDuration = 5;   
  593.            return;
  594.    };
  595.    $gameSystem._trefctData[0] = false;
  596.    _mog_tre_scmap_startEncounterEffect.call(this);
  597. };

  598. //==============================
  599. // * setTRType
  600. //==============================
  601. Scene_Map.prototype.setTRType = function() {
  602.    $gameSystem._trefctData[0] = true;
  603.    $gameSystem._trefctData[1] = $gameSystem.setTransitionR();               
  604.    $gameSystem._trefctData[2] = 0;
  605. };

  606. //==============================
  607. // * updateEncounterEffect
  608. //==============================
  609. var _mog_tre_scmap_updateEncounterEffect = Scene_Map.prototype.updateEncounterEffect;
  610. Scene_Map.prototype.updateEncounterEffect = function() {
  611.         if ($gameSystem._treType[0] >= 0) {return};
  612.         _mog_tre_scmap_updateEncounterEffect.call(this);
  613. };

  614. //=============================================================================
  615. // ** Scene Battle
  616. //=============================================================================

  617. //==============================
  618. // * Update
  619. //==============================
  620. var _mog_trefct_scbattle_update = Scene_Battle.prototype.update;
  621. Scene_Battle.prototype.update = function() {
  622.         if (SceneManager.needTrasition()) {this.executeTransitionEffect();return};
  623.         _mog_trefct_scbattle_update.call(this);
  624. };

  625. //==============================
  626. // * Create
  627. //==============================
  628. var _mog_trefct_scbattle_create = Scene_Battle.prototype.create;
  629. Scene_Battle.prototype.create = function() {
  630.     _mog_trefct_scbattle_create.call(this);
  631.         if ($gameSystem._treType[0] >= 0) {
  632.         $gameSystem._trefctData[0] = true;
  633.                 $gameSystem._trefctData[1] = $gameSystem._treType[0];
  634.         $gameSystem._trefctData[2] = 1;       
  635.         };
  636. };
复制代码

代码么也看不懂,哪位大神能把随机效果 改成只有0,1,3号效果可能触发触发,2号的模糊效果实在吃不消,一切入战斗立马卡死
上面说错了,是blur模糊效果会卡死,Noise效果不算卡
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3801
在线时间
555 小时
注册时间
2016-2-11
帖子
113
3
发表于 2017-7-27 08:52:10 | 只看该作者
本身插件参数就有设置。
顺便,我这什么效果都不会卡死,,看来你真的该换电脑了{:2_262:}
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
7536
在线时间
1106 小时
注册时间
2008-8-6
帖子
154

开拓者

4
发表于 2017-7-27 09:42:48 | 只看该作者
我的也很流畅
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-13 03:02

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表