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

Project1

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

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

[复制链接]

Lv1.梦旅人

梦石
0
星屑
119
在线时间
65 小时
注册时间
2013-2-20
帖子
34
跳转到指定楼层
1
发表于 2017-4-10 00:54:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

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

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

JAVASCRIPT 代码复制下载
  1. //=============================================================================
  2. // AndrewX - Automatic Battle Camera
  3. // AndrewX_AutomaticBattleCamera.js
  4. //=============================================================================
  5. var Imported = Imported || {};
  6.  
  7. var AndrewX = AndrewX || {};
  8. AndrewX.ABC = AndrewX.ABC || {};
  9. //=============================================================================
  10. /*:
  11.  * @plugindesc v0.10 Automatic focus camera on target in battle.
  12.  * @author AndrewX
  13.  *
  14.  * @param Camera Frame Speed
  15.  * @desc 镜头帧速,数字越小越快。默认10
  16.  * @default 10
  17.  *
  18.  * @param Zoom In Rate
  19.  * @desc 镜头放大率。正常大小1.0,默认放大到1.1
  20.  * @default 1.1
  21.  *
  22.  * @param Zoom Out Rate
  23.  * @desc 镜头拉远率,用于全屏动画。正常大小1.0,默认缩小到0.9
  24.  * @default 0.9
  25.  *
  26.  * @param Battleback Zoom Rate
  27.  * @desc 背景增大率,避免默认素材背景在镜头移动后出现黑边所做的处理。默认1.3
  28.  * @default 1.3
  29.  *
  30.  * @param Scale Battleback
  31.  * @desc 战斗背景适应窗口。0: 不拉伸; 1: 仅在战斗背景小于屏幕尺寸时拉伸,2: 总是适应窗口。默认1
  32.  * @default 1
  33.  *
  34.  * @param Zoom When Selecting
  35.  * @desc 是否在选择目标时聚焦。true: 聚焦; false: 不聚焦。默认false
  36.  * @default false
  37.  *
  38.  * @param Depth Sacle Rate
  39.  * @desc 敌人近大远小比例,填入由空格分隔的两个小数,分别为最远(上)处比例和最近(下)处比例。默认0.5 1.2。不使用此功能则留空
  40.  * @default 0.5 1.2
  41.  *
  42.  * @help
  43.  * ============================================================================
  44.  * Introduction and Instructions
  45.  * ============================================================================
  46.  *
  47.  * 本插件实现纵版战斗镜头自动推进和拉远的效果。
  48.  *
  49.  * 仅适用于纵版战斗。
  50.  *
  51.  * Credit: 本插件思路来自芙蕾娅的VA脚本:
  52.  * [url]http://rpg.blue/home.php?mod=space&uid=310500&do=blog&id=13408[/url]
  53.  * 加入选择目标时镜头跟随,战斗背景自适应,敌人近大远小功能。
  54.  * 修正了动画位置跟随和伤害跳字跟随的问题。
  55.  * 并且兼容Yanfly的战斗血条插件,兼容YEP_CoreEngine.js选中敌人不闪烁功能。
  56.  *
  57.  * 动画名称标签:
  58.  * <NO CAMERA>
  59.  * 如果动画名称中包含“<NO CAMERA>”(包括尖括号,必须大写),则该动画播放不会引发
  60.  * 镜头效果。
  61.  *
  62.  * ============================================================================
  63.  * Changelog
  64.  * ============================================================================
  65.  *
  66.  * Version 0.20:
  67.  * - New: Add <NO CAMERA> in name of animations to disable camera movement for
  68.  *   these animations
  69.  * - Modified: Zoom When Selecting parameter is set false as default now
  70.  * - Minor bug fix
  71.  *
  72.  * Version 0.10:
  73.  * - Finished prototype
  74.  *
  75.  * ============================================================================
  76.  * Term of Use
  77.  * ============================================================================
  78.  *
  79.  * Free for use in non-commercial or commercial RMMV projects
  80.  * Please credit AndrewX & 芙蕾娅
  81.  *
  82.  */
  83. //=============================================================================
  84.  
  85.  
  86. (function() {
  87.  
  88.     var parameters = PluginManager.parameters('AndrewX_AutomaticBattleCamera');
  89.     var cameraFrameSpeed = Number(parameters['Camera Frame Speed'] || 10);
  90.     var zoomIn = Number(parameters['Zoom In Rate'] || 1.1);
  91.     var zoomOut = Number(parameters['Zoom Out Rate'] || 0.9);
  92.     var battlebackZoom = Number(parameters['Battleback Zoom Rate'] || 1.3);
  93.     var scaleBattlebcak = Number(parameters['Scale Battleback'] || 1);
  94.     var zoomSelect = parameters['Zoom When Selecting'] || "false"
  95.     var depthScaleRate = (parameters['Depth Sacle Rate'] || "1.0 1.0").split(" ");
  96.     depthScaleRate = (depthScaleRate.length < 2) ? [1, 1] : depthScaleRate;
  97.     for (var i = 0; i < depthScaleRate.length; i++) {
  98.         depthScaleRate[i] = Number(depthScaleRate[i]);
  99.         depthScaleRate[i] = (depthScaleRate[i] === 0) ? 1 : depthScaleRate[i];
  100.     };
  101.  
  102.     function Battle_Camera() {
  103.         this.initialize.apply(this, arguments);
  104.     };
  105.  
  106.     Battle_Camera.prototype.initialize = function() {
  107.         this.x = Graphics.width / 2;
  108.         this.y = Graphics.height / 2;
  109.         this.newX = Graphics.width / 2;
  110.         this.newY = Graphics.height / 2;
  111.         this.centerWidth = Graphics.width / 2;
  112.         this.centerHeight = Graphics.height / 2;
  113.         this.zoom = 1.0;
  114.         this.newZoom = 1.0;
  115.         this.frameSpeed = cameraFrameSpeed;
  116.         this.back1OriginalX = 0;
  117.         this.back1OriginalY = 0;
  118.         this.back2OriginalX = 0;
  119.         this.back2OriginalY = 0;
  120.     };
  121.  
  122.     Battle_Camera.prototype.resetFrameSpeed = function() {
  123.         this.frameSpeed = cameraFrameSpeed;
  124.     };
  125.  
  126.     Battle_Camera.prototype.focusOn = function(target, zoom, speed) {
  127.         if (target.isEnemy()) {
  128.             this.resetFrameSpeed();
  129.             this.newX = target.screenX();
  130.  
  131.             var yOffset = 0;
  132.             var enemySprites = BattleManager._spriteset._enemySprites;
  133.             for (var i = 0; i < enemySprites.length; i++) {
  134.                 var sprite = enemySprites[i];
  135.                 if (target === sprite._battler) {
  136.                     yOffset = sprite.height / 2;
  137.                     break;
  138.                 }
  139.             }
  140.             var statusWindowHeight = 0;
  141.             if (typeof SceneManager._scene._statusWindow !== "undefined") {
  142.                 statusWindowHeight = SceneManager._scene._statusWindow.height
  143.             }
  144.  
  145.             this.newY = target.screenY() - yOffset + statusWindowHeight / 2; //调节基准点
  146.             if (!(typeof zoom === "undefined")) {
  147.                 this.newZoom = zoom;
  148.             }
  149.             if (!(typeof speed === "undefined")) {
  150.                 this.frameSpeed = speed;
  151.             }
  152.         }
  153.     };
  154.  
  155.     Battle_Camera.prototype.center = function(zoom) {
  156.         this.newX = this.centerWidth;
  157.         this.newY = this.centerHeight;
  158.         if (!(zoom === undefined)) {
  159.             this.newZoom = zoom;
  160.         } else {
  161.             this.newZoom = 1.0;
  162.         }
  163.     };
  164.  
  165.     Battle_Camera.prototype.battlerX = function(battler) {
  166.         var distance = battler.screenX() - this.x;
  167.         var value = distance * (this.zoom - 1.0);
  168.         var pos = battler.screenX() - (this.x - this.centerWidth);
  169.         return pos + value;
  170.     };
  171.  
  172.     Battle_Camera.prototype.battlerY = function(battler) {
  173.         var distance = battler.screenY() - this.y;
  174.         var value = distance * (this.zoom - 1.0);
  175.         var pos = battler.screenY() - (this.y - this.centerHeight);
  176.         return pos + value;
  177.     };
  178.  
  179.     Battle_Camera.prototype.update = function() {
  180.         if (this.x != this.newX) {
  181.             this.x = (this.newX - this.x > 0) ?
  182.                 Math.min(this.x + this.moveSpeedX(), this.newX) :
  183.                 Math.max(this.x - this.moveSpeedX(), this.newX);
  184.         }
  185.         if (this.y != this.newY) {
  186.             this.y = (this.newY - this.y > 0) ?
  187.                 Math.min(this.y + this.moveSpeedY(), this.newY) :
  188.                 Math.max(this.y - this.moveSpeedY(), this.newY);
  189.         }
  190.         if (this.zoom != this.newZoom) {
  191.             this.zoom = (this.newZoom - this.zoom > 0) ?
  192.                 Math.min(this.zoom + this.zoomSpeed(), this.newZoom) :
  193.                 Math.max(this.zoom - this.zoomSpeed(), this.newZoom);
  194.         }
  195.     };
  196.  
  197.     Battle_Camera.prototype.distanceX = function() {
  198.         return Math.abs(this.x - this.newX);
  199.     };
  200.  
  201.     Battle_Camera.prototype.distanceY = function() {
  202.         return Math.abs(this.y - this.newY);
  203.     };
  204.  
  205.     Battle_Camera.prototype.distanceZoom = function() {
  206.         return Math.abs(this.zoom - this.newZoom);
  207.     };
  208.  
  209.     Battle_Camera.prototype.moveSpeedX = function() {
  210.         return Math.max(Math.floor(this.distanceX() / this.frameSpeed), 1);
  211.     };
  212.  
  213.     Battle_Camera.prototype.moveSpeedY = function() {
  214.         return Math.max(Math.floor(this.distanceY() / this.frameSpeed), 1);
  215.     };
  216.  
  217.     Battle_Camera.prototype.zoomSpeed = function() {
  218.         return Math.max(this.distanceZoom() / this.frameSpeed, 0.001);
  219.     };
  220.  
  221.     AndrewX.ABC.updateCellSprite = Sprite_Animation.prototype.updateCellSprite;
  222.     Sprite_Animation.prototype.updateCellSprite = function(sprite, cell) {
  223.         var pattern = cell[0];
  224.         if (pattern >= 0) {
  225.             var sx = pattern % 5 * 192;
  226.             var sy = Math.floor(pattern % 100 / 5) * 192;
  227.             var mirror = this._mirror;
  228.             sprite.bitmap = pattern < 100 ? this._bitmap1 : this._bitmap2;
  229.             sprite.setFrame(sx, sy, 192, 192);
  230.             sprite.x = cell[1];
  231.             sprite.y = cell[2];
  232.             if (this._mirror) {
  233.                 sprite.x *= -1;
  234.             }
  235.             if (typeof BattleManager._spriteset === "undefined") {
  236.                 var zoom = 1
  237.             } else {
  238.                 var zoom = BattleManager._spriteset.battleCamera.zoom;
  239.             }
  240.             sprite.rotation = cell[4] * Math.PI / 180;
  241.             sprite.scale.x = cell[3] / 100 * zoom; //here
  242.             if ((cell[5] && !mirror) || (!cell[5] && mirror)) {
  243.                 sprite.scale.x *= -1;
  244.             }
  245.             sprite.scale.y = cell[3] / 100 * zoom; //here
  246.             sprite.opacity = cell[6];
  247.             sprite.blendMode = cell[7];
  248.             sprite.visible = this._target.visible;
  249.         } else {
  250.             sprite.visible = false;
  251.         }
  252.     };
  253.  
  254.     AndrewX.ABC.spritesetBattleInitialize = Spriteset_Battle.prototype.initialize;
  255.     Spriteset_Battle.prototype.initialize = function() {
  256.         this.battleCamera = new Battle_Camera();
  257.         AndrewX.ABC.spritesetBattleInitialize.call(this);
  258.  
  259.     };
  260.  
  261.     AndrewX.ABC.spritesetBattleUpdate = Spriteset_Battle.prototype.update;
  262.     Spriteset_Battle.prototype.update = function() {
  263.         AndrewX.ABC.spritesetBattleUpdate.call(this);
  264.         this.battleCamera.update();
  265.         this.updateBattlebackPosition();
  266.         this.updateEnemyPosition();
  267.     };
  268.  
  269.     AndrewX.ABC.locateBattleback = Spriteset_Battle.prototype.locateBattleback;
  270.     Spriteset_Battle.prototype.locateBattleback = function() {
  271.         var width = this._battleField.width;
  272.         var height = this._battleField.height;
  273.         var sprite1 = this._back1Sprite;
  274.         var sprite2 = this._back2Sprite;
  275.         sprite1.origin.x = 0;
  276.         sprite2.origin.x = 0;
  277.         sprite1.origin.y = 0;
  278.         sprite2.origin.y = 0;
  279.         sprite1.anchor.x = 0.5;
  280.         sprite1.anchor.y = 0.5;
  281.         sprite2.anchor.x = 0.5;
  282.         sprite2.anchor.y = 0.5;
  283.         var x = this._battleField.width / 2;
  284.         var y = this._battleField.height / 2;
  285.         sprite1.move(x, y, sprite1.bitmap.width, sprite1.bitmap.height);
  286.         sprite2.move(x, y, sprite2.bitmap.width, sprite2.bitmap.height);
  287.         this.battleCamera.back1OriginalX = this._back1Sprite.x;
  288.         this.battleCamera.back1OriginalY = this._back1Sprite.y;
  289.         this.battleCamera.back2OriginalX = this._back2Sprite.x;
  290.         this.battleCamera.back2OriginalY = this._back2Sprite.y;
  291.     };
  292.  
  293.     Spriteset_Battle.prototype.updateBattlebackPosition = function() {
  294.         var zoom = this.battleCamera.zoom * battlebackZoom;
  295.         var sprite1 = this._back1Sprite;
  296.         var sprite2 = this._back2Sprite;
  297.  
  298.         var back1ScaleX = 1;
  299.         var back2ScaleX = 1;
  300.         var back1ScaleY = 1;
  301.         var back2ScaleY = 1;
  302.  
  303.         if (scaleBattlebcak === 1) {
  304.             if (!(sprite1.bitmap.width <= 0 || sprite1.bitmap <= 0)) {
  305.                 back1ScaleX = Math.max(Graphics.boxWidth / sprite1.bitmap.width, 1);
  306.                 back1ScaleY = Math.max(Graphics.boxHeight / sprite1.bitmap.height, 1);
  307.             }
  308.             if (!(sprite2.bitmap.width <= 0 || sprite2.bitmap <= 0)) {
  309.                 back2ScaleX = Math.max(Graphics.boxWidth / sprite2.bitmap.width, 1);
  310.                 back2ScaleY = Math.max(Graphics.boxHeight / sprite2.bitmap.height, 1);
  311.             }
  312.         } else if (scaleBattlebcak === 2) {
  313.             if (!(sprite1.bitmap.width <= 0 || sprite1.bitmap <= 0)) {
  314.                 back1ScaleX = Graphics.boxWidth / sprite1.bitmap.width;
  315.                 back1ScaleY = Graphics.boxHeight / sprite1.bitmap.height;
  316.             }
  317.             if (!(sprite2.bitmap.width <= 0 || sprite2.bitmap <= 0)) {
  318.                 back2ScaleX = Graphics.boxWidth / sprite2.bitmap.width;
  319.                 back2ScaleY = Graphics.boxHeight / sprite2.bitmap.height;
  320.             }
  321.         }
  322.  
  323.         sprite1.scale.x = zoom * back1ScaleX;
  324.         sprite1.scale.y = zoom * back1ScaleY;
  325.         sprite2.scale.x = zoom * back2ScaleX;
  326.         sprite2.scale.y = zoom * back1ScaleY;
  327.  
  328.         var camera = this.battleCamera;
  329.         var cameraDistX = this.battleCamera.x - this.battleCamera.centerWidth;
  330.         var cameraDistY = this.battleCamera.y - this.battleCamera.centerHeight;
  331.         sprite1.x = camera.back1OriginalX - cameraDistX;
  332.         sprite1.y = camera.back1OriginalY - cameraDistY;
  333.         sprite2.x = camera.back2OriginalX - cameraDistX;
  334.         sprite2.y = camera.back2OriginalY - cameraDistY;
  335.     };
  336.  
  337.     Spriteset_Battle.prototype.updateEnemyPosition = function() {
  338.         for (var i = 0; i < this._enemySprites.length; i++) {
  339.             var sprite = this._enemySprites[i];
  340.  
  341.             var statusWindowHeight = 0;
  342.             if (typeof SceneManager._scene._statusWindow !== "undefined") {
  343.                 statusWindowHeight = SceneManager._scene._statusWindow.height
  344.             }
  345.             var fieldHeight = Graphics.boxHeight - statusWindowHeight;
  346.  
  347.             var minScale = Math.min(depthScaleRate[0], depthScaleRate[1]);
  348.             var maxScale = Math.max(depthScaleRate[0], depthScaleRate[1]);
  349.  
  350.             var depthScale = minScale + (maxScale - minScale) * sprite.y / fieldHeight;
  351.             sprite.scale.x = this.battleCamera.zoom * depthScale;
  352.             sprite.scale.y = this.battleCamera.zoom * depthScale;
  353.             sprite.x = this.battleCamera.battlerX(sprite._battler);
  354.             sprite.y = this.battleCamera.battlerY(sprite._battler);
  355.         }
  356.     };
  357.  
  358.  
  359.     AndrewX.ABC.invokeAction = BattleManager.invokeAction;
  360.     BattleManager.invokeAction = function(subject, target) {
  361.         AndrewX.ABC.invokeAction.call(this, subject, target);
  362.         BattleManager._spriteset.battleCamera.center();
  363.     };
  364.  
  365.     AndrewX.ABC.showNormalAnimation = Window_BattleLog.prototype.showNormalAnimation;
  366.     Window_BattleLog.prototype.showNormalAnimation = function(targets, animationId, mirror) {
  367.         var animation = $dataAnimations[animationId];
  368.         if (animation && !animation.name.match("<NO CAMERA>")) {
  369.             var delay = this.animationBaseDelay();
  370.             var nextDelay = this.animationNextDelay();
  371.             if (targets.length > 1) {
  372.                 targets.forEach(function(target) {
  373.                     if (target.isEnemy()) {
  374.                         BattleManager._spriteset.battleCamera.center(zoomOut);
  375.                     }
  376.                     target.startAnimation(animationId, mirror, delay);
  377.                     delay += nextDelay;
  378.                 });
  379.             } else {
  380.                 targets.forEach(function(target) {
  381.                     if (target.isEnemy() && animation.position !== 3) {
  382.                         BattleManager._spriteset.battleCamera.focusOn(target, zoomIn);
  383.                     }
  384.                     if (target.isEnemy() && animation.position === 3) {
  385.                         BattleManager._spriteset.battleCamera.center(zoomOut);
  386.                     }
  387.                     target.startAnimation(animationId, mirror, delay);
  388.                     delay += nextDelay;
  389.                 });
  390.             }
  391.         } else {
  392.             AndrewX.ABC.showNormalAnimation.call(this, targets, animationId, mirror);
  393.         }
  394.     };
  395.  
  396.     AndrewX.ABC.updateSelectionEffect = Sprite_Battler.prototype.updateSelectionEffect;
  397.     Sprite_Battler.prototype.updateSelectionEffect = function() {
  398.         if (zoomSelect.toUpperCase() === "TRUE") {
  399.             var target = this._effectTarget;
  400.             if (this._battler.isSelected()) {
  401.                 this._selectionEffectCount++;
  402.                 if (target instanceof Sprite_Enemy) {
  403.                     var camera = BattleManager._spriteset.battleCamera;
  404.                     camera.focusOn(target._battler, zoomIn);
  405.                 }
  406.                 if (this._selectionEffectCount % 30 < 15) {
  407.                     target.setBlendColor([255, 255, 255, 64]);
  408.                 } else {
  409.                     target.setBlendColor([0, 0, 0, 0]);
  410.                 }
  411.             } else if (this._selectionEffectCount > 0) {
  412.                 this._selectionEffectCount = 0;
  413.                 BattleManager._spriteset.battleCamera.center();
  414.                 target.setBlendColor([0, 0, 0, 0]);
  415.             }
  416.         } else {
  417.             AndrewX.ABC.updateSelectionEffect.call(this);
  418.         }
  419.     };
  420.  
  421.     AndrewX.ABC.updateDamagePopup = Sprite_Battler.prototype.updateDamagePopup;
  422.     Sprite_Battler.prototype.updateDamagePopup = function() {
  423.         if (this._battler.isEnemy()) {
  424.             this.setupDamagePopup();
  425.             if (this._damages.length > 0) {
  426.                 for (var i = 0; i < this._damages.length; i++) {
  427.                     var camera = BattleManager._spriteset.battleCamera;
  428.                     var battlerX = camera.battlerX(this._battler);
  429.                     var battlerY = camera.battlerY(this._battler);
  430.                     this._damages[i].x = battlerX + this.damageOffsetX();
  431.                     this._damages[i].y = battlerY + this.damageOffsetY();
  432.                     this._damages[i].update();
  433.                 }
  434.                 if (!this._damages[0].isPlaying()) {
  435.                     this.parent.removeChild(this._damages[0]);
  436.                     this._damages.shift();
  437.                 }
  438.             }
  439.         } else {
  440.             AndrewX.ABC.updateDamagePopup.call(this);
  441.         }
  442.     };
  443.  
  444.     AndrewX.ABC.updateAnimationPosition = Sprite_Animation.prototype.updatePosition;
  445.     Sprite_Animation.prototype.updatePosition = function() {
  446.         if (this._target._battler.isEnemy()) {
  447.             if (this._animation.position === 3) {
  448.                 this.x = this.parent.width / 2;
  449.                 this.y = this.parent.height / 2;
  450.             } else {
  451.                 var parent = this._target.parent;
  452.                 var grandparent = parent ? parent.parent : null;
  453.                 var camera = BattleManager._spriteset.battleCamera;
  454.                 var battlerX = camera.battlerX(this._target._battler);
  455.                 var battlerY = camera.battlerY(this._target._battler);
  456.                 this.x = battlerX;
  457.                 this.y = battlerY;
  458.                 if (this.parent === grandparent) {
  459.                     this.x += parent.x;
  460.                     this.y += parent.y;
  461.                 }
  462.                 if (this._animation.position === 0) {
  463.                     this.y -= this._target.height;
  464.                 } else if (this._animation.position === 1) {
  465.                     this.y -= this._target.height / 2;
  466.                 }
  467.             }
  468.         } else {
  469.             AndrewX.ABC.updateAnimationPosition.call(this);
  470.         }
  471.     };
  472.  
  473.     if (Imported.YEP_X_VisualHpGauge) {
  474.         AndrewX.ABC.updateVisualHPGaugeWindowPosition = Window_VisualHPGauge.prototype.updateWindowPosition;
  475.         Window_VisualHPGauge.prototype.updateWindowPosition = function() {
  476.             if (!this._battler) return;
  477.             if (this._battler.isEnemy()) {
  478.                 var battler = this._battler;
  479.                 var camera = BattleManager._spriteset.battleCamera;
  480.                 var battlerX = camera.battlerX(battler);
  481.                 var battlerY = camera.battlerY(battler);
  482.                 this.x = battlerX;
  483.                 this.x -= Math.ceil(this.width / 2);
  484.                 this.x = this.x.clamp(this._minX, this._maxX);
  485.                 this.y = battlerY;
  486.                 if (Yanfly.Param.VHGGaugePos) {
  487.                     this.y -= battler.spriteHeight();
  488.                 } else {
  489.                     this.y -= this.standardPadding();
  490.                 }
  491.                 this.y = this.y.clamp(this._minY, this._maxY);
  492.                 this.y += Yanfly.Param.VHGBufferY;
  493.             } else {
  494.                 AndrewX.ABC.updateVisualHPGaugeWindowPosition.call(this);
  495.             }
  496.         };
  497.     }
  498.  
  499.     if (Imported.YEP_BattleEngineCore) {
  500.         Window_EnemyVisualSelect.prototype.updateWindowSize = function() {
  501.             var spriteWidth = this._battler.spriteWidth();
  502.             this.contents.fontSize = Yanfly.Param.BECEnemyFontSize;
  503.             var textWidth = this.textWidth(this._battler.name());
  504.             textWidth += this.textPadding() * 2;
  505.             var width = textWidth + this.standardPadding() * 2;
  506.             var height = this.lineHeight() + this.standardPadding() * 2;
  507.             if (width === this.width && height === this.height) return;
  508.             this.width = width;
  509.             this.height = height;
  510.             this.createContents();
  511.             this._requestRefresh = true;
  512.             this.makeWindowBoundaries();
  513.         };
  514.     }
  515.  
  516.     if (Imported.YEP_CoreEngine) {
  517.         if (!eval(Yanfly.Param.FlashTarget)) {
  518.             AndrewX.ABC.updateSelectionEffect_YanflyFix = Sprite_Battler.prototype.updateSelectionEffect;
  519.             Sprite_Battler.prototype.updateSelectionEffect = function() {
  520.                 if (zoomSelect.toUpperCase() === "TRUE") {
  521.                     var target = this._effectTarget;
  522.                     if (this._battler.isSelected()) {
  523.                         this._selectionEffectCount++;
  524.                         if (target instanceof Sprite_Enemy) {
  525.                             var camera = BattleManager._spriteset.battleCamera;
  526.                             camera.focusOn(target._battler, zoomIn);
  527.                         }
  528.                         if (this._battler.isActor()) {
  529.                             AndrewX.ABC.updateSelectionEffect_YanflyFix.call(this);
  530.                         } else {
  531.                             if (this._battler.isSelected()) this.startEffect('whiten');
  532.                         }
  533.                     } else if (this._selectionEffectCount > 0) {
  534.                         this._selectionEffectCount = 0;
  535.                         BattleManager._spriteset.battleCamera.center();
  536.                         target.setBlendColor([0, 0, 0, 0]);
  537.                     }
  538.                 } else {
  539.                     AndrewX.ABC.updateSelectionEffect_YanflyFix.call(this);
  540.                 }
  541.             };
  542.         };
  543.     }
  544. })();
[

Lv1.梦旅人

梦石
0
星屑
55
在线时间
407 小时
注册时间
2011-4-10
帖子
359
2
发表于 2017-4-10 02:19:27 | 只看该作者
我记得MV某次更新后(可能是升级了pixi.js那次),很多为旧版写的插件都不能正常运行生效了。这个插件是什么时间写成的?作者有没有说明它在什么MV版本中使用?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

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

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

使用道具 举报

Lv1.梦旅人

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

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-28 14:01

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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