查看: 2754|回复: 4

[已经过期] 使用了纵向战斗镜头移动的插件,但是战斗背景出现问题。

[复制链接]
梦石
0
星屑
134
在线时间
66 小时
注册时间
2013-2-20
回帖
28
发表于 2017-4-10 00:54:12 | 显示全部楼层 |阅读模式

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

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

×
如图所示,成了这副样子。

以下是插件,能帮我解决的话,万分感谢!


  1. //=============================================================================
  2. // AndrewX - Automatic Battle Camera
  3. // AndrewX_AutomaticBattleCamera.js
  4. //=============================================================================
  5. var Imported = Imported || {};

  6. var AndrewX = AndrewX || {};
  7. AndrewX.ABC = AndrewX.ABC || {};
  8. //=============================================================================
  9. /*:
  10. * @plugindesc v0.10 Automatic focus camera on target in battle.
  11. * @author AndrewX
  12. *
  13. * @param Camera Frame Speed
  14. * @desc 镜头帧速,数字越小越快。默认10
  15. * @default 10
  16. *
  17. * @param Zoom In Rate
  18. * @desc 镜头放大率。正常大小1.0,默认放大到1.1
  19. * @default 1.1
  20. *
  21. * @param Zoom Out Rate
  22. * @desc 镜头拉远率,用于全屏动画。正常大小1.0,默认缩小到0.9
  23. * @default 0.9
  24. *
  25. * @param Battleback Zoom Rate
  26. * @desc 背景增大率,避免默认素材背景在镜头移动后出现黑边所做的处理。默认1.3
  27. * @default 1.3
  28. *
  29. * @param Scale Battleback
  30. * @desc 战斗背景适应窗口。0: 不拉伸; 1: 仅在战斗背景小于屏幕尺寸时拉伸,2: 总是适应窗口。默认1
  31. * @default 1
  32. *
  33. * @param Zoom When Selecting
  34. * @desc 是否在选择目标时聚焦。true: 聚焦; false: 不聚焦。默认false
  35. * @default false
  36. *
  37. * @param Depth Sacle Rate
  38. * @desc 敌人近大远小比例,填入由空格分隔的两个小数,分别为最远(上)处比例和最近(下)处比例。默认0.5 1.2。不使用此功能则留空
  39. * @default 0.5 1.2
  40. *
  41. * @help
  42. * ============================================================================
  43. * Introduction and Instructions
  44. * ============================================================================
  45. *
  46. * 本插件实现纵版战斗镜头自动推进和拉远的效果。
  47. *
  48. * 仅适用于纵版战斗。
  49. *
  50. * Credit: 本插件思路来自芙蕾娅的VA脚本:
  51. * [url]http://rpg.blue/home.php?mod=space&uid=310500&do=blog&id=13408[/url]
  52. * 加入选择目标时镜头跟随,战斗背景自适应,敌人近大远小功能。
  53. * 修正了动画位置跟随和伤害跳字跟随的问题。
  54. * 并且兼容Yanfly的战斗血条插件,兼容YEP_CoreEngine.js选中敌人不闪烁功能。
  55. *
  56. * 动画名称标签:
  57. * <NO CAMERA>
  58. * 如果动画名称中包含“<NO CAMERA>”(包括尖括号,必须大写),则该动画播放不会引发
  59. * 镜头效果。
  60. *
  61. * ============================================================================
  62. * Changelog
  63. * ============================================================================
  64. *
  65. * Version 0.20:
  66. * - New: Add <NO CAMERA> in name of animations to disable camera movement for
  67. *   these animations
  68. * - Modified: Zoom When Selecting parameter is set false as default now
  69. * - Minor bug fix
  70. *
  71. * Version 0.10:
  72. * - Finished prototype
  73. *
  74. * ============================================================================
  75. * Term of Use
  76. * ============================================================================
  77. *
  78. * Free for use in non-commercial or commercial RMMV projects
  79. * Please credit AndrewX & 芙蕾娅
  80. *
  81. */
  82. //=============================================================================


  83. (function() {

  84.     var parameters = PluginManager.parameters('AndrewX_AutomaticBattleCamera');
  85.     var cameraFrameSpeed = Number(parameters['Camera Frame Speed'] || 10);
  86.     var zoomIn = Number(parameters['Zoom In Rate'] || 1.1);
  87.     var zoomOut = Number(parameters['Zoom Out Rate'] || 0.9);
  88.     var battlebackZoom = Number(parameters['Battleback Zoom Rate'] || 1.3);
  89.     var scaleBattlebcak = Number(parameters['Scale Battleback'] || 1);
  90.     var zoomSelect = parameters['Zoom When Selecting'] || "false"
  91.     var depthScaleRate = (parameters['Depth Sacle Rate'] || "1.0 1.0").split(" ");
  92.     depthScaleRate = (depthScaleRate.length < 2) ? [1, 1] : depthScaleRate;
  93.     for (var i = 0; i < depthScaleRate.length; i++) {
  94.         depthScaleRate[i] = Number(depthScaleRate[i]);
  95.         depthScaleRate[i] = (depthScaleRate[i] === 0) ? 1 : depthScaleRate[i];
  96.     };

  97.     function Battle_Camera() {
  98.         this.initialize.apply(this, arguments);
  99.     };

  100.     Battle_Camera.prototype.initialize = function() {
  101.         this.x = Graphics.width / 2;
  102.         this.y = Graphics.height / 2;
  103.         this.newX = Graphics.width / 2;
  104.         this.newY = Graphics.height / 2;
  105.         this.centerWidth = Graphics.width / 2;
  106.         this.centerHeight = Graphics.height / 2;
  107.         this.zoom = 1.0;
  108.         this.newZoom = 1.0;
  109.         this.frameSpeed = cameraFrameSpeed;
  110.         this.back1OriginalX = 0;
  111.         this.back1OriginalY = 0;
  112.         this.back2OriginalX = 0;
  113.         this.back2OriginalY = 0;
  114.     };

  115.     Battle_Camera.prototype.resetFrameSpeed = function() {
  116.         this.frameSpeed = cameraFrameSpeed;
  117.     };

  118.     Battle_Camera.prototype.focusOn = function(target, zoom, speed) {
  119.         if (target.isEnemy()) {
  120.             this.resetFrameSpeed();
  121.             this.newX = target.screenX();

  122.             var yOffset = 0;
  123.             var enemySprites = BattleManager._spriteset._enemySprites;
  124.             for (var i = 0; i < enemySprites.length; i++) {
  125.                 var sprite = enemySprites[i];
  126.                 if (target === sprite._battler) {
  127.                     yOffset = sprite.height / 2;
  128.                     break;
  129.                 }
  130.             }
  131.             var statusWindowHeight = 0;
  132.             if (typeof SceneManager._scene._statusWindow !== "undefined") {
  133.                 statusWindowHeight = SceneManager._scene._statusWindow.height
  134.             }

  135.             this.newY = target.screenY() - yOffset + statusWindowHeight / 2; //调节基准点
  136.             if (!(typeof zoom === "undefined")) {
  137.                 this.newZoom = zoom;
  138.             }
  139.             if (!(typeof speed === "undefined")) {
  140.                 this.frameSpeed = speed;
  141.             }
  142.         }
  143.     };

  144.     Battle_Camera.prototype.center = function(zoom) {
  145.         this.newX = this.centerWidth;
  146.         this.newY = this.centerHeight;
  147.         if (!(zoom === undefined)) {
  148.             this.newZoom = zoom;
  149.         } else {
  150.             this.newZoom = 1.0;
  151.         }
  152.     };

  153.     Battle_Camera.prototype.battlerX = function(battler) {
  154.         var distance = battler.screenX() - this.x;
  155.         var value = distance * (this.zoom - 1.0);
  156.         var pos = battler.screenX() - (this.x - this.centerWidth);
  157.         return pos + value;
  158.     };

  159.     Battle_Camera.prototype.battlerY = function(battler) {
  160.         var distance = battler.screenY() - this.y;
  161.         var value = distance * (this.zoom - 1.0);
  162.         var pos = battler.screenY() - (this.y - this.centerHeight);
  163.         return pos + value;
  164.     };

  165.     Battle_Camera.prototype.update = function() {
  166.         if (this.x != this.newX) {
  167.             this.x = (this.newX - this.x > 0) ?
  168.                 Math.min(this.x + this.moveSpeedX(), this.newX) :
  169.                 Math.max(this.x - this.moveSpeedX(), this.newX);
  170.         }
  171.         if (this.y != this.newY) {
  172.             this.y = (this.newY - this.y > 0) ?
  173.                 Math.min(this.y + this.moveSpeedY(), this.newY) :
  174.                 Math.max(this.y - this.moveSpeedY(), this.newY);
  175.         }
  176.         if (this.zoom != this.newZoom) {
  177.             this.zoom = (this.newZoom - this.zoom > 0) ?
  178.                 Math.min(this.zoom + this.zoomSpeed(), this.newZoom) :
  179.                 Math.max(this.zoom - this.zoomSpeed(), this.newZoom);
  180.         }
  181.     };

  182.     Battle_Camera.prototype.distanceX = function() {
  183.         return Math.abs(this.x - this.newX);
  184.     };

  185.     Battle_Camera.prototype.distanceY = function() {
  186.         return Math.abs(this.y - this.newY);
  187.     };

  188.     Battle_Camera.prototype.distanceZoom = function() {
  189.         return Math.abs(this.zoom - this.newZoom);
  190.     };

  191.     Battle_Camera.prototype.moveSpeedX = function() {
  192.         return Math.max(Math.floor(this.distanceX() / this.frameSpeed), 1);
  193.     };

  194.     Battle_Camera.prototype.moveSpeedY = function() {
  195.         return Math.max(Math.floor(this.distanceY() / this.frameSpeed), 1);
  196.     };

  197.     Battle_Camera.prototype.zoomSpeed = function() {
  198.         return Math.max(this.distanceZoom() / this.frameSpeed, 0.001);
  199.     };

  200.     AndrewX.ABC.updateCellSprite = Sprite_Animation.prototype.updateCellSprite;
  201.     Sprite_Animation.prototype.updateCellSprite = function(sprite, cell) {
  202.         var pattern = cell[0];
  203.         if (pattern >= 0) {
  204.             var sx = pattern % 5 * 192;
  205.             var sy = Math.floor(pattern % 100 / 5) * 192;
  206.             var mirror = this._mirror;
  207.             sprite.bitmap = pattern < 100 ? this._bitmap1 : this._bitmap2;
  208.             sprite.setFrame(sx, sy, 192, 192);
  209.             sprite.x = cell[1];
  210.             sprite.y = cell[2];
  211.             if (this._mirror) {
  212.                 sprite.x *= -1;
  213.             }
  214.             if (typeof BattleManager._spriteset === "undefined") {
  215.                 var zoom = 1
  216.             } else {
  217.                 var zoom = BattleManager._spriteset.battleCamera.zoom;
  218.             }
  219.             sprite.rotation = cell[4] * Math.PI / 180;
  220.             sprite.scale.x = cell[3] / 100 * zoom; //here
  221.             if ((cell[5] && !mirror) || (!cell[5] && mirror)) {
  222.                 sprite.scale.x *= -1;
  223.             }
  224.             sprite.scale.y = cell[3] / 100 * zoom; //here
  225.             sprite.opacity = cell[6];
  226.             sprite.blendMode = cell[7];
  227.             sprite.visible = this._target.visible;
  228.         } else {
  229.             sprite.visible = false;
  230.         }
  231.     };

  232.     AndrewX.ABC.spritesetBattleInitialize = Spriteset_Battle.prototype.initialize;
  233.     Spriteset_Battle.prototype.initialize = function() {
  234.         this.battleCamera = new Battle_Camera();
  235.         AndrewX.ABC.spritesetBattleInitialize.call(this);

  236.     };

  237.     AndrewX.ABC.spritesetBattleUpdate = Spriteset_Battle.prototype.update;
  238.     Spriteset_Battle.prototype.update = function() {
  239.         AndrewX.ABC.spritesetBattleUpdate.call(this);
  240.         this.battleCamera.update();
  241.         this.updateBattlebackPosition();
  242.         this.updateEnemyPosition();
  243.     };

  244.     AndrewX.ABC.locateBattleback = Spriteset_Battle.prototype.locateBattleback;
  245.     Spriteset_Battle.prototype.locateBattleback = function() {
  246.         var width = this._battleField.width;
  247.         var height = this._battleField.height;
  248.         var sprite1 = this._back1Sprite;
  249.         var sprite2 = this._back2Sprite;
  250.         sprite1.origin.x = 0;
  251.         sprite2.origin.x = 0;
  252.         sprite1.origin.y = 0;
  253.         sprite2.origin.y = 0;
  254.         sprite1.anchor.x = 0.5;
  255.         sprite1.anchor.y = 0.5;
  256.         sprite2.anchor.x = 0.5;
  257.         sprite2.anchor.y = 0.5;
  258.         var x = this._battleField.width / 2;
  259.         var y = this._battleField.height / 2;
  260.         sprite1.move(x, y, sprite1.bitmap.width, sprite1.bitmap.height);
  261.         sprite2.move(x, y, sprite2.bitmap.width, sprite2.bitmap.height);
  262.         this.battleCamera.back1OriginalX = this._back1Sprite.x;
  263.         this.battleCamera.back1OriginalY = this._back1Sprite.y;
  264.         this.battleCamera.back2OriginalX = this._back2Sprite.x;
  265.         this.battleCamera.back2OriginalY = this._back2Sprite.y;
  266.     };

  267.     Spriteset_Battle.prototype.updateBattlebackPosition = function() {
  268.         var zoom = this.battleCamera.zoom * battlebackZoom;
  269.         var sprite1 = this._back1Sprite;
  270.         var sprite2 = this._back2Sprite;

  271.         var back1ScaleX = 1;
  272.         var back2ScaleX = 1;
  273.         var back1ScaleY = 1;
  274.         var back2ScaleY = 1;

  275.         if (scaleBattlebcak === 1) {
  276.             if (!(sprite1.bitmap.width <= 0 || sprite1.bitmap <= 0)) {
  277.                 back1ScaleX = Math.max(Graphics.boxWidth / sprite1.bitmap.width, 1);
  278.                 back1ScaleY = Math.max(Graphics.boxHeight / sprite1.bitmap.height, 1);
  279.             }
  280.             if (!(sprite2.bitmap.width <= 0 || sprite2.bitmap <= 0)) {
  281.                 back2ScaleX = Math.max(Graphics.boxWidth / sprite2.bitmap.width, 1);
  282.                 back2ScaleY = Math.max(Graphics.boxHeight / sprite2.bitmap.height, 1);
  283.             }
  284.         } else if (scaleBattlebcak === 2) {
  285.             if (!(sprite1.bitmap.width <= 0 || sprite1.bitmap <= 0)) {
  286.                 back1ScaleX = Graphics.boxWidth / sprite1.bitmap.width;
  287.                 back1ScaleY = Graphics.boxHeight / sprite1.bitmap.height;
  288.             }
  289.             if (!(sprite2.bitmap.width <= 0 || sprite2.bitmap <= 0)) {
  290.                 back2ScaleX = Graphics.boxWidth / sprite2.bitmap.width;
  291.                 back2ScaleY = Graphics.boxHeight / sprite2.bitmap.height;
  292.             }
  293.         }

  294.         sprite1.scale.x = zoom * back1ScaleX;
  295.         sprite1.scale.y = zoom * back1ScaleY;
  296.         sprite2.scale.x = zoom * back2ScaleX;
  297.         sprite2.scale.y = zoom * back1ScaleY;

  298.         var camera = this.battleCamera;
  299.         var cameraDistX = this.battleCamera.x - this.battleCamera.centerWidth;
  300.         var cameraDistY = this.battleCamera.y - this.battleCamera.centerHeight;
  301.         sprite1.x = camera.back1OriginalX - cameraDistX;
  302.         sprite1.y = camera.back1OriginalY - cameraDistY;
  303.         sprite2.x = camera.back2OriginalX - cameraDistX;
  304.         sprite2.y = camera.back2OriginalY - cameraDistY;
  305.     };

  306.     Spriteset_Battle.prototype.updateEnemyPosition = function() {
  307.         for (var i = 0; i < this._enemySprites.length; i++) {
  308.             var sprite = this._enemySprites[i];

  309.             var statusWindowHeight = 0;
  310.             if (typeof SceneManager._scene._statusWindow !== "undefined") {
  311.                 statusWindowHeight = SceneManager._scene._statusWindow.height
  312.             }
  313.             var fieldHeight = Graphics.boxHeight - statusWindowHeight;

  314.             var minScale = Math.min(depthScaleRate[0], depthScaleRate[1]);
  315.             var maxScale = Math.max(depthScaleRate[0], depthScaleRate[1]);

  316.             var depthScale = minScale + (maxScale - minScale) * sprite.y / fieldHeight;
  317.             sprite.scale.x = this.battleCamera.zoom * depthScale;
  318.             sprite.scale.y = this.battleCamera.zoom * depthScale;
  319.             sprite.x = this.battleCamera.battlerX(sprite._battler);
  320.             sprite.y = this.battleCamera.battlerY(sprite._battler);
  321.         }
  322.     };


  323.     AndrewX.ABC.invokeAction = BattleManager.invokeAction;
  324.     BattleManager.invokeAction = function(subject, target) {
  325.         AndrewX.ABC.invokeAction.call(this, subject, target);
  326.         BattleManager._spriteset.battleCamera.center();
  327.     };

  328.     AndrewX.ABC.showNormalAnimation = Window_BattleLog.prototype.showNormalAnimation;
  329.     Window_BattleLog.prototype.showNormalAnimation = function(targets, animationId, mirror) {
  330.         var animation = $dataAnimations[animationId];
  331.         if (animation && !animation.name.match("<NO CAMERA>")) {
  332.             var delay = this.animationBaseDelay();
  333.             var nextDelay = this.animationNextDelay();
  334.             if (targets.length > 1) {
  335.                 targets.forEach(function(target) {
  336.                     if (target.isEnemy()) {
  337.                         BattleManager._spriteset.battleCamera.center(zoomOut);
  338.                     }
  339.                     target.startAnimation(animationId, mirror, delay);
  340.                     delay += nextDelay;
  341.                 });
  342.             } else {
  343.                 targets.forEach(function(target) {
  344.                     if (target.isEnemy() && animation.position !== 3) {
  345.                         BattleManager._spriteset.battleCamera.focusOn(target, zoomIn);
  346.                     }
  347.                     if (target.isEnemy() && animation.position === 3) {
  348.                         BattleManager._spriteset.battleCamera.center(zoomOut);
  349.                     }
  350.                     target.startAnimation(animationId, mirror, delay);
  351.                     delay += nextDelay;
  352.                 });
  353.             }
  354.         } else {
  355.             AndrewX.ABC.showNormalAnimation.call(this, targets, animationId, mirror);
  356.         }
  357.     };

  358.     AndrewX.ABC.updateSelectionEffect = Sprite_Battler.prototype.updateSelectionEffect;
  359.     Sprite_Battler.prototype.updateSelectionEffect = function() {
  360.         if (zoomSelect.toUpperCase() === "TRUE") {
  361.             var target = this._effectTarget;
  362.             if (this._battler.isSelected()) {
  363.                 this._selectionEffectCount++;
  364.                 if (target instanceof Sprite_Enemy) {
  365.                     var camera = BattleManager._spriteset.battleCamera;
  366.                     camera.focusOn(target._battler, zoomIn);
  367.                 }
  368.                 if (this._selectionEffectCount % 30 < 15) {
  369.                     target.setBlendColor([255, 255, 255, 64]);
  370.                 } else {
  371.                     target.setBlendColor([0, 0, 0, 0]);
  372.                 }
  373.             } else if (this._selectionEffectCount > 0) {
  374.                 this._selectionEffectCount = 0;
  375.                 BattleManager._spriteset.battleCamera.center();
  376.                 target.setBlendColor([0, 0, 0, 0]);
  377.             }
  378.         } else {
  379.             AndrewX.ABC.updateSelectionEffect.call(this);
  380.         }
  381.     };

  382.     AndrewX.ABC.updateDamagePopup = Sprite_Battler.prototype.updateDamagePopup;
  383.     Sprite_Battler.prototype.updateDamagePopup = function() {
  384.         if (this._battler.isEnemy()) {
  385.             this.setupDamagePopup();
  386.             if (this._damages.length > 0) {
  387.                 for (var i = 0; i < this._damages.length; i++) {
  388.                     var camera = BattleManager._spriteset.battleCamera;
  389.                     var battlerX = camera.battlerX(this._battler);
  390.                     var battlerY = camera.battlerY(this._battler);
  391.                     this._damages[i].x = battlerX + this.damageOffsetX();
  392.                     this._damages[i].y = battlerY + this.damageOffsetY();
  393.                     this._damages[i].update();
  394.                 }
  395.                 if (!this._damages[0].isPlaying()) {
  396.                     this.parent.removeChild(this._damages[0]);
  397.                     this._damages.shift();
  398.                 }
  399.             }
  400.         } else {
  401.             AndrewX.ABC.updateDamagePopup.call(this);
  402.         }
  403.     };

  404.     AndrewX.ABC.updateAnimationPosition = Sprite_Animation.prototype.updatePosition;
  405.     Sprite_Animation.prototype.updatePosition = function() {
  406.         if (this._target._battler.isEnemy()) {
  407.             if (this._animation.position === 3) {
  408.                 this.x = this.parent.width / 2;
  409.                 this.y = this.parent.height / 2;
  410.             } else {
  411.                 var parent = this._target.parent;
  412.                 var grandparent = parent ? parent.parent : null;
  413.                 var camera = BattleManager._spriteset.battleCamera;
  414.                 var battlerX = camera.battlerX(this._target._battler);
  415.                 var battlerY = camera.battlerY(this._target._battler);
  416.                 this.x = battlerX;
  417.                 this.y = battlerY;
  418.                 if (this.parent === grandparent) {
  419.                     this.x += parent.x;
  420.                     this.y += parent.y;
  421.                 }
  422.                 if (this._animation.position === 0) {
  423.                     this.y -= this._target.height;
  424.                 } else if (this._animation.position === 1) {
  425.                     this.y -= this._target.height / 2;
  426.                 }
  427.             }
  428.         } else {
  429.             AndrewX.ABC.updateAnimationPosition.call(this);
  430.         }
  431.     };

  432.     if (Imported.YEP_X_VisualHpGauge) {
  433.         AndrewX.ABC.updateVisualHPGaugeWindowPosition = Window_VisualHPGauge.prototype.updateWindowPosition;
  434.         Window_VisualHPGauge.prototype.updateWindowPosition = function() {
  435.             if (!this._battler) return;
  436.             if (this._battler.isEnemy()) {
  437.                 var battler = this._battler;
  438.                 var camera = BattleManager._spriteset.battleCamera;
  439.                 var battlerX = camera.battlerX(battler);
  440.                 var battlerY = camera.battlerY(battler);
  441.                 this.x = battlerX;
  442.                 this.x -= Math.ceil(this.width / 2);
  443.                 this.x = this.x.clamp(this._minX, this._maxX);
  444.                 this.y = battlerY;
  445.                 if (Yanfly.Param.VHGGaugePos) {
  446.                     this.y -= battler.spriteHeight();
  447.                 } else {
  448.                     this.y -= this.standardPadding();
  449.                 }
  450.                 this.y = this.y.clamp(this._minY, this._maxY);
  451.                 this.y += Yanfly.Param.VHGBufferY;
  452.             } else {
  453.                 AndrewX.ABC.updateVisualHPGaugeWindowPosition.call(this);
  454.             }
  455.         };
  456.     }

  457.     if (Imported.YEP_BattleEngineCore) {
  458.         Window_EnemyVisualSelect.prototype.updateWindowSize = function() {
  459.             var spriteWidth = this._battler.spriteWidth();
  460.             this.contents.fontSize = Yanfly.Param.BECEnemyFontSize;
  461.             var textWidth = this.textWidth(this._battler.name());
  462.             textWidth += this.textPadding() * 2;
  463.             var width = textWidth + this.standardPadding() * 2;
  464.             var height = this.lineHeight() + this.standardPadding() * 2;
  465.             if (width === this.width && height === this.height) return;
  466.             this.width = width;
  467.             this.height = height;
  468.             this.createContents();
  469.             this._requestRefresh = true;
  470.             this.makeWindowBoundaries();
  471.         };
  472.     }

  473.     if (Imported.YEP_CoreEngine) {
  474.         if (!eval(Yanfly.Param.FlashTarget)) {
  475.             AndrewX.ABC.updateSelectionEffect_YanflyFix = Sprite_Battler.prototype.updateSelectionEffect;
  476.             Sprite_Battler.prototype.updateSelectionEffect = function() {
  477.                 if (zoomSelect.toUpperCase() === "TRUE") {
  478.                     var target = this._effectTarget;
  479.                     if (this._battler.isSelected()) {
  480.                         this._selectionEffectCount++;
  481.                         if (target instanceof Sprite_Enemy) {
  482.                             var camera = BattleManager._spriteset.battleCamera;
  483.                             camera.focusOn(target._battler, zoomIn);
  484.                         }
  485.                         if (this._battler.isActor()) {
  486.                             AndrewX.ABC.updateSelectionEffect_YanflyFix.call(this);
  487.                         } else {
  488.                             if (this._battler.isSelected()) this.startEffect('whiten');
  489.                         }
  490.                     } else if (this._selectionEffectCount > 0) {
  491.                         this._selectionEffectCount = 0;
  492.                         BattleManager._spriteset.battleCamera.center();
  493.                         target.setBlendColor([0, 0, 0, 0]);
  494.                     }
  495.                 } else {
  496.                     AndrewX.ABC.updateSelectionEffect_YanflyFix.call(this);
  497.                 }
  498.             };
  499.         };
  500.     }
  501. })();
复制代码
[
梦石
0
星屑
55
在线时间
407 小时
注册时间
2011-4-10
回帖
352
发表于 2017-4-10 02:19:27 | 显示全部楼层
我记得MV某次更新后(可能是升级了pixi.js那次),很多为旧版写的插件都不能正常运行生效了。这个插件是什么时间写成的?作者有没有说明它在什么MV版本中使用?
回复

使用道具 举报

梦石
0
星屑
134
在线时间
66 小时
注册时间
2013-2-20
回帖
28
 楼主| 发表于 2017-4-10 12:15:38 | 显示全部楼层
sutao80216 发表于 2017-4-10 02:19
我记得MV某次更新后(可能是升级了pixi.js那次),很多为旧版写的插件都不能正常运行生效了。这个插件是什 ...

是2016年的插件,但没有说明使用的版本。
[
回复

使用道具 举报

梦石
0
星屑
55
在线时间
407 小时
注册时间
2011-4-10
回帖
352
发表于 2017-4-10 19:16:20 | 显示全部楼层
2016年8月更新的1.3版本,是把底层的pixi.js升级到了pixi4,很多兼容性问题就是这次升级出现的。如果你使用插件的姿势正确,那很大可能就是碰到兼容性问题了。解决方法,一是联系作者看看有没有新版本,二是先不使用新版的编辑器。当然,如果动手能力很强,自己写个补丁就行了。
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部