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

Project1

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

[已经解决] 用了AnimatedSVEnemies敌人动态的插件结果敌人方向是相反的

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
18 小时
注册时间
2015-8-3
帖子
12
跳转到指定楼层
1
发表于 2016-2-25 16:42:36 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 ytcdtdj 于 2016-2-25 16:49 编辑

也就是敌人和玩家同向而不是面对面的。。。应该调哪个参数呢?

QQ图片20160225164750.png (248.31 KB, 下载次数: 19)

QQ图片20160225164750.png

Lv1.梦旅人

梦石
0
星屑
50
在线时间
18 小时
注册时间
2015-8-3
帖子
12
2
 楼主| 发表于 2016-2-25 16:43:40 | 只看该作者
本帖最后由 余烬之中 于 2016-2-27 09:44 编辑

JAVASCRIPT 代码复制
  1. //=============================================================================
  2. // AnimatedSVEnemies.js
  3. // Version: 1.16a - The Re-Remake
  4. //=============================================================================
  5.  
  6. var Imported = Imported || {};
  7. Imported.AnimatedSVEnemies = true;
  8.  
  9. var Rexal = Rexal || {};
  10. Rexal.ASVE = Rexal.ASVE || {};
  11. /*:
  12.  * @plugindesc 版本:1.16——Re-Remake
  13. *——让敌人动画!
  14.  * @author Rexal
  15.  *
  16.  
  17.   * @param Debug
  18.  * @desc 登录到控制台(F8)?
  19.  * @default true
  20.  
  21.  * @param No Movement
  22.  * @desc 执行操作时防止敌人移动。
  23.  * @default false
  24.  
  25.  * @param Enemies Celebrate
  26.  * @desc 敌人将庆祝你的灭亡。
  27.  * @default true
  28.  
  29.   * @param SV Enemies Collapse
  30.  * @desc 所有SV敌人死后将会崩溃。
  31.  * @default false
  32.  
  33.  * @param Static Enemies Breathe
  34.  * @desc 静态的敌人有呼吸的影响
  35.  * @default true
  36.  
  37.  * @param AGI Effects Breathing
  38.  * @desc 静态敌人更高播洒统计会呼吸得更快。
  39.  * @default true
  40.  
  41.  * @param Scale Statics by Distance
  42.  * @desc 静态的敌人会在后台较小的越远
  43.  * @default true
  44.  
  45.   * @param Damage Slows Down Breathing
  46.  * @desc 呼吸减慢了更大的伤害
  47.  * @default true
  48.  
  49.   * @help
  50.  
  51.  --------------------------------------------------------------------------------
  52.  Notetags
  53.  ================================================================================
  54.  
  55.  
  56.  ---------------------------[SV Battlers]---------------------------------
  57.  
  58.  [SV Animated]
  59.  -集敌人使用SV演员雪碧。这些都是位于sv_actors
  60. 文件夹中。确保有一个精灵,文件夹名称相匹配
  61. 你用敌人的形象。
  62.  
  63.  [Collapse]
  64.  - 让SV敌人使用崩溃动画不管参数设置。
  65.  
  66.  [No Collapse]
  67.  - 阻止SV敌人使用崩溃动画无论参数设置。
  68.  
  69.  SV Motion: motion
  70.  -集敌人攻击时使用这种运动。如果你不知道什么运动
  71. 您可以使用,请参考运动列表底部的帮助部分。
  72.   SV Weapon: id
  73.  - “装备”这种武器的敌人。
  74.  
  75.  Ex: SV Weapon: 1
  76.  
  77.         SV Weapon Scale: amount
  78.         增加武器的大小相同的量。
  79.  
  80.          SV Weapon Anchor: x,y
  81.         设置武器的锚点。
  82. Ex. SV Weapon Anchor: .5,1
  83.  
  84.           SV Anchor: x,y
  85.          集战斗者的锚点。
  86.  
  87. Ex. SV Anchor: .5,1
  88.  
  89.   ----------------------------[Static Battlers]---------------------------------
  90.  
  91.  [Breathless]
  92.  -这个敌人不呼吸。有用的魔像和邪恶的墙壁。
  93.  
  94.  [Float]
  95.  吹嘘的有一个浮动的效果类似于rm2k3的敌人。
  96.  
  97. 呼吸控制:speedScale xScale yScale
  98. 集的速度正弦波,多少次的雪碧的大小
  99. 允许去width-wise height-wise。
  100.  
  101. 你要尝试直到它看起来正常一点的值。的
  102. 下面的例子是默认设置。
  103.  
  104.  Ex: Breath Control: 50,5,25
  105.  
  106.  
  107.  -----------------------------------[Both]---------------------------------------
  108.  
  109.  Enemy Scale: amount
  110.  
  111. 增加了敌人的大小相同的量。
  112.  
  113.  
  114.  --------------------------------------------------------------------------------
  115.  Version Log
  116.  ================================================================================
  117.  
  118. v1 -初始版本
  119.  
  120. v1.05——许多修复
  121. ——固定问题的敌人不打正确的动画,不止一个
  122. 敌人是在屏幕上。
  123. - Misc。修复,我忘记了。
  124. ——添加SV武器,它可以让你发挥武器动画(目前向后)。
  125. 这是我其他不兼容脚本:精灵武器增强。
  126. 添加了一个参数,阻止敌人移动。
  127.  
  128. v1.075——深呼吸
  129. ——静态的敌人现在呼吸!
  130. ——添加很多东西来控制呼吸。(notetags不工作!)
  131.  
  132. v1.08——固定呼吸
  133. ——呼吸notetags工作现在!耶!
  134. ——添加(浮动)
  135.  
  136. v1.1——生活和重新加载
  137.  
  138. 呼吸减慢惠普敌人越少。(及他们只是呼吸更少)
  139. ——添加一个选项,让敌人规模进一步分成背景。
  140. ——固定武器!
  141. ——敌人可以庆祝你的灭亡。
  142. ——固定Flash目标错误。
  143. - SV敌人可以崩溃。
  144. - SV敌人将正确地出现
  145. ——敌人有适当的逃脱动画。
  146. ——敌人现在正确定位。
  147. ——你现在可以规模敌人无论你想要的。
  148.  
  149. v1.101 -
  150.  
  151. ——添加一个参数,以防止敌人呼吸慢更大的伤害。
  152.  
  153. v1.11 -
  154.  
  155. ——固定定位。对不起!
  156.  
  157. v1.111 -
  158. ——没有发表评论。
  159. v1.113 -
  160. 固定武器。
  161.  
  162.  
  163. v1.12 -
  164. ——完全重写脚本的关键部分。
  165. ——请注意标签不再是区分大小写的。
  166. ——正式固定定位。
  167. ——固定流动问题。
  168.  
  169. v1.15——Re-Remake
  170. ——大规模清理,应该让它更兼容。
  171.  
  172. v1.15.1 -
  173. 还伤害数字没有出现问题。
  174. v1.15.3
  175. 固定一些东西。
  176. v1.15.5
  177. 员工的一些东西。= m =
  178.  
  179.  
  180. v1.15.5.1
  181. 应该更兼容的东西
  182.  
  183.  
  184. v1.16a
  185.  
  186.  
  187. - - -
  188. ——一般改进
  189. ——添加SV雪碧
  190. ——改变了武器的处理方式。
  191.  
  192.  --------------------------------------------------------------------------------
  193.  Motion List
  194.  ================================================================================
  195.  walk -准备好了动画
  196.  wait - 空闲动画
  197.  chant -魔法动画做好了准备
  198.  guard - 警卫动画
  199.  damage - 伤害的动画
  200.  evade -逃避动画
  201.  thrust - 刺动画
  202.  swing - 摆动的动画
  203.  missile - 射击动画
  204.  skill - 物理技能使用动画
  205.  spell - 神奇的技能使用动画
  206.  item - 道具使用动画
  207.  escape - 逃避动画
  208.  victory - 胜利的动画
  209.  dying - 危险”动画
  210.  abnormal - 异常的影响
  211.  sleep - 睡觉的动画
  212.  dead - 死动画
  213.  
  214.  
  215.  */
  216.  
  217. Rexal.ASVE.Parameters = PluginManager.parameters('animatedSVEnemies');
  218. Rexal.ASVE.Debug = eval(String(Rexal.ASVE.Parameters['Debug']));
  219. Rexal.ASVE.NoMovement = eval(String(Rexal.ASVE.Parameters['No Movement']));
  220.   Rexal.ASVE.Breathe = eval(String(Rexal.ASVE.Parameters['Static Enemies Breathe']));
  221.   Rexal.ASVE.AGIB = eval(String(Rexal.ASVE.Parameters['AGI Effects Breathing']));
  222.   Rexal.ASVE.Celebration = eval(String(Rexal.ASVE.Parameters['Enemies Celebrate']));
  223.    Rexal.ASVE.DoCollapse = eval(String(Rexal.ASVE.Parameters['SV Enemies Collapse']));
  224. Rexal.ASVE.DamageSlow = eval(String(Rexal.ASVE.Parameters['Damage Slows Down Breathing']));
  225.      Rexal.ASVE.ScaleStatics = eval(String(Rexal.ASVE.Parameters['Scale Statics by Distance']));  
  226.  
  227.  
  228.   //-----------------------------------------------------------------------------
  229. //Original Functions Storage
  230. //=============================================================================
  231. Rexal.ASVE.Game_Enemy_makeActions = Game_Enemy.prototype.makeActions;
  232. Rexal.ASVE.Game_Enemy_performDamage = Game_Enemy.prototype.performDamage;
  233. Rexal.ASVE.Sprite_Enemy_updateBitmap =   Sprite_Enemy.prototype.updateBitmap;
  234. Rexal.ASVE.seupdateappear = Sprite_Enemy.prototype.updateAppear;
  235. Rexal.ASVE.processDefeat = BattleManager.processDefeat;
  236. Rexal.ASVE.spriteactorupdatebitmap = Sprite_Actor.prototype.updateBitmap;
  237. Rexal.ASVE.setupweaponanimation = Sprite_Actor.prototype.setupWeaponAnimation;
  238. Rexal.ASVE.setactorhome = Sprite_Actor.prototype.setActorHome;
  239.   //-----------------------------------------------------------------------------
  240. // BattleManager
  241. //=============================================================================
  242.  
  243.   if(Rexal.ASVE.Celebration)
  244.   {  
  245.  
  246.   BattleManager.processDefeat = function() {
  247.           Rexal.ASVE.processDefeat.call(this);
  248.     if(Rexal.ASVE.Celebration)$gameTroop.performVictory();
  249. };
  250.   }
  251.  
  252.  
  253.   //-----------------------------------------------------------------------------
  254. // Game_Enemy
  255. //=============================================================================
  256.  
  257. Game_Enemy.prototype.weapons = function() {
  258. var item = this._equips[0];
  259. return [item && DataManager.isWeapon(item)];
  260. };
  261.  
  262. Game_Enemy.prototype.hasWeapon = function(weapon) {
  263.     return this._equips[0];
  264. };
  265.  
  266. Game_Enemy.prototype.performAttack = function() {
  267.  
  268. if(this._equips[0])
  269.         Game_Actor.prototype.performAttack.call(this);
  270. else
  271. {
  272. this.requestMotion(this._motion);
  273. }
  274.  
  275. };
  276.  
  277. Game_Enemy.prototype.attackAnimationId1 = function() {
  278. Game_Actor.prototype.attackAnimationId1.call(this);
  279. };
  280.  
  281. Game_Enemy.prototype.attackAnimationId2 = function() {
  282. Game_Actor.prototype.attackAnimationId2.call(this);
  283. };
  284.  
  285. Game_Enemy.prototype.bareHandsAnimationId = function() {
  286. Game_Actor.prototype.bareHandsAnimationId.call(this);
  287. };
  288.  
  289. Game_Enemy.prototype.hasNoWeapons = function() {
  290. Game_Actor.prototype.hasNoWeapons.call(this);
  291. }
  292.  
  293.  
  294. Game_Enemy.prototype.performAction = function(action) {
  295. Game_Actor.prototype.performAction.call(this,action);
  296. };
  297.  
  298. Game_Enemy.prototype.performDamage = function() {
  299.     Rexal.ASVE.Game_Enemy_performDamage.call(this);
  300.     this.requestMotion('damage');
  301. };
  302.  
  303. Game_Enemy.prototype.actor = function() {
  304.     return $dataEnemies[this._enemyId];
  305. };
  306.  
  307.  
  308. Game_Enemy.prototype.performEvasion = function() {
  309.     Game_Battler.prototype.performEvasion.call(this);
  310.     this.requestMotion('evade');
  311. };
  312.  
  313. Game_Enemy.prototype.performMagicEvasion = function() {
  314.     Game_Battler.prototype.performMagicEvasion.call(this);
  315.     this.requestMotion('evade');
  316. };
  317.  
  318. Game_Enemy.prototype.performCounter = function() {
  319.     Game_Battler.prototype.performCounter.call(this);
  320.     this.performAttack();
  321. };
  322.  
  323. Game_Enemy.prototype.performVictory = function() {
  324.     if (this.canMove()) {
  325.         this.requestMotion('victory');
  326.     }
  327. };
  328.  
  329.  
  330.  
  331. Game_Enemy.prototype.makeActions = function() {
  332. Rexal.ASVE.Game_Enemy_makeActions.call(this);
  333. this.setActionState('undecided');
  334. };
  335.  
  336.  
  337. Game_Enemy.prototype.performEscape = function() {
  338.     if (this.canMove()) {
  339.         this.requestMotion('escape');
  340.     }
  341. };
  342.  
  343.   //-----------------------------------------------------------------------------
  344. // Game_Troop
  345. //=============================================================================
  346. Game_Troop.prototype.performVictory = function() {
  347.     this.members().forEach(function(enemy) {
  348.         enemy.performVictory();
  349.     });
  350. };
  351.   //-----------------------------------------------------------------------------
  352. // Sprite_Enemy
  353. //=============================================================================
  354.  
  355. Sprite_Enemy.prototype.setBattler = function(battler) {
  356.     Sprite_Battler.prototype.setBattler.call(this, battler);
  357.         this._random = [Math.random()*1000000,Math.random()*1000000,Math.random()*1000000];
  358.     this._enemy = battler;
  359.     this.setHome(battler.screenX(), battler.screenY());
  360.     this._stateIconSprite.setup(battler);
  361. };
  362.  
  363. Sprite_Enemy.prototype.updateBitmap = function() {
  364.  
  365. Rexal.ASVE.Sprite_Enemy_updateBitmap.call(this);
  366.  
  367.         if(!this._enemy._breathless && Rexal.ASVE.Breathe){
  368.                 var a = 1;
  369.                 if(Rexal.ASVE.AGIB) a = this._enemy.agi/100+1;
  370.         var breathS = this._enemy._breath[0]/1000;
  371.         var bx = (Graphics.frameCount+this._random[0]);
  372.         var by = (Graphics.frameCount+this._random[1]);
  373.         if(Rexal.ASVE.DamageSlow) breathS *= (this._enemy.hp/this._enemy.mhp)+.1;
  374.         var breathY = Math.cos(bx*breathS*a)*(this._enemy._breath[2]/1000);
  375.         var breathX = Math.cos(by*breathS)*(this._enemy._breath[1]/1000);
  376.         if(Rexal.ASVE.DamageSlow)breathY *= (this._enemy.hp/this._enemy.mhp);
  377.         var ss = Graphics.boxHeight/624+.1;
  378.         if(Rexal.ASVE.ScaleStatics)var s = ss*(this._homeY/Graphics.boxHeight)*this._enemy._scale;
  379.         else var s = this._enemy._scale;
  380.         this.smooth = true;
  381.         this.scale.y = s+breathY;
  382.         this.scale.x = s+breathX;
  383.         }
  384.  
  385.         if(this._enemy._floating && !this.isBusy)
  386.         {
  387.                 var f = Math.cos(Graphics.frameCount/50+this._random[2]*a)*20*a;
  388.                 this.setHome(this._enemy.screenX(),this._enemy.screenY()+f);
  389.         }
  390.  
  391. };
  392.  
  393. var sesf = Sprite_Enemy.prototype.stepForward;
  394. Sprite_Enemy.prototype.stepForward = function() {
  395.    if(!Rexal.ASVE.NoMovement) sesf.call(this);
  396. };
  397.  
  398.  
  399.         var sesh = Sprite_Enemy.prototype.setHome;
  400.                 Sprite_Enemy.prototype.setHome = function(x,y) {
  401.                         sesh.call(this,x,y);
  402.                         var dX = Graphics.boxWidth/816;
  403.                         var dY = Graphics.boxHeight/624;
  404.  
  405.                         y*= dY;
  406.                         x*= dX;
  407.  
  408.                         this._homeX = x;
  409.                         this._homeY = y + (Graphics.boxHeight - 624)/3;
  410.                         this.updatePosition();
  411.         };
  412.  
  413.   //-----------------------------------------------------------------------------
  414. // Sprite_EnemyRex
  415. //=============================================================================
  416.  
  417. function Sprite_EnemyRex() {
  418.     this.initialize.apply(this, arguments);
  419. }
  420.  
  421.  
  422. Sprite_EnemyRex.prototype = Object.create(Sprite_Actor.prototype);
  423. Sprite_EnemyRex.prototype.constructor = Sprite_EnemyRex;
  424.  
  425. Sprite_EnemyRex.prototype.loadBitmap = function(name, hue) {
  426.            if(this._actor._battleSprite != "")name = this._battleSprite;
  427.         this.bitmap = ImageManager.loadSvActor(name,hue);
  428. };
  429.  
  430. Sprite_EnemyRex.prototype.setBattler = function(battler) {
  431.         // this._enemySprite = new Sprite_Enemy(battler);
  432.                 // this._enemySprite._homeX = 0;
  433.     // this._enemySprite._homeY = 0;
  434.  
  435.  
  436.     Sprite_Battler.prototype.setBattler.call(this, battler);
  437.         //this.addChild(this._enemySprite);
  438.  
  439.  
  440.         var changed = (battler !== this._actor);
  441.     if (changed) {
  442.         this._actor = battler;
  443.                 this._enemy = battler;
  444.         if (battler) {
  445.             this.setActorHome(battler);
  446.         }
  447.         this.startEntryMotion();
  448.         this._stateSprite.setup(battler);
  449.     }
  450. };
  451.  
  452.  
  453.  
  454. Sprite_EnemyRex.prototype.updateBitmap = function() {
  455.  
  456.         Rexal.ASVE.spriteactorupdatebitmap.call(this);
  457.         this.updateEffect();
  458.         var hue = this._actor.battlerHue();
  459. var name = this._actor.battlerName();
  460.   if(this._actor._battleSprite)name = this._actor._battleSprite;
  461.  
  462.         this._mainSprite.bitmap = ImageManager.loadSvActor(name,hue);
  463.                 this._mainSprite.anchor.x = this._actor._anchor[0];
  464.                 this._mainSprite.anchor.y = this._actor._anchor[1];
  465.         this.flipChildren();
  466. };
  467.  
  468. Sprite_EnemyRex.prototype.flipChildren = function(){
  469. for(var i = 0; i<this.children.length; i++)
  470. {
  471. if(this.children[i].scale.x!=-this._actor._scale)this.children[i].scale.x = -this._actor._scale;
  472. if(this.children[i].scale.y!=this._actor._scale) this.children[i].scale.y = this._actor._scale;
  473. }
  474.  
  475. }
  476.  
  477. Sprite_EnemyRex.prototype.setupWeaponAnimation = function() {
  478.  
  479.         Rexal.ASVE.setupweaponanimation.call(this);
  480.                 if(!this._weaponSprite._positioned)
  481.                 {       
  482.                 var scale = this._actor._scale+this._actor._weaponScale;
  483.                 this._weaponSprite.x = -this._weaponSprite.x*scale;
  484.                 this._weaponSprite.anchor.x = this._actor._weaponAnchor[0];
  485.                 this._weaponSprite.anchor.y = this._actor._weaponAnchor[1];
  486.                 this._weaponSprite._positioned = true;
  487.                 }
  488.  
  489.  
  490. };
  491.  
  492. Sprite_EnemyRex.prototype.setActorHome = function(battler) {
  493.                         Rexal.ASVE.setactorhome.call(this);
  494.                         var dX = Graphics.boxWidth/816;
  495.                         var dY = Graphics.boxHeight/624;
  496.  
  497.                         var x = battler.screenX()*dX;
  498.                         var y = battler.screenY()*dY;
  499.  
  500.                         this._homeX = x;
  501.                         this._homeY = y + (Graphics.boxHeight - 624)/3;
  502.                         this.updatePosition();
  503.         };
  504.  
  505.  
  506.  
  507.  
  508. Sprite_EnemyRex.prototype.stepForward = function() {
  509.    if(!Rexal.ASVE.NoMovement) this.startMove(48, 0, 12);
  510. };
  511.  
  512. Sprite_EnemyRex.prototype.stepBack = function() {
  513.    if(!Rexal.ASVE.NoMovement) this.startMove(0, 0, 12);
  514. };
  515.  
  516. Sprite_EnemyRex.prototype.retreat = function() {
  517.     this.startMove(300, 0, 30);
  518. };
  519.  
  520. Sprite_EnemyRex.prototype.initVisibility = function() {
  521.     this._appeared = this._actor.isAlive();
  522.     if (!this._appeared) {
  523.         this.opacity = 0;
  524.     }
  525. };
  526.  
  527. Sprite_EnemyRex.prototype.setupEffect = function() {
  528.          this._enemy = this._actor;
  529. Sprite_Enemy.prototype.setupEffect.call(this);
  530. };
  531.  
  532. Sprite_EnemyRex.prototype.startEffect = function(effectType) {
  533.  
  534.     this._effectType = effectType;
  535.     switch (this._effectType) {
  536.     case 'appear':
  537.         this.startAppear();
  538.         break;
  539.     case 'disappear':
  540.         this.startDisappear();
  541.         break;
  542.     case 'whiten':
  543.         this.startWhiten();
  544.         break;
  545.     case 'collapse':
  546.      if(this._actor._collapse)   this.startCollapse();
  547.         break;
  548.     case 'bossCollapse':
  549.         this.startBossCollapse();
  550.         break;
  551.     case 'instantCollapse':
  552.         this.startInstantCollapse();
  553.         break;
  554.     }
  555.     this.revertToNormal();
  556. };
  557.  
  558. Sprite_EnemyRex.prototype.startAppear = function() {
  559. Sprite_Enemy.prototype.startAppear.call(this);
  560. };
  561.  
  562. Sprite_EnemyRex.prototype.startDisappear = function() {
  563. Sprite_Enemy.prototype.startDisappear.call(this);
  564. };
  565.  
  566. Sprite_EnemyRex.prototype.startWhiten = function() {
  567. Sprite_Enemy.prototype.startWhiten.call(this);
  568. };
  569.  
  570. Sprite_EnemyRex.prototype.startBlink = function() {
  571. Sprite_Enemy.prototype.startBlink.call(this);
  572. };
  573.  
  574. Sprite_EnemyRex.prototype.startCollapse = function() {
  575. Sprite_Enemy.prototype.startCollapse.call(this);
  576. };
  577.  
  578. Sprite_EnemyRex.prototype.startBossCollapse = function() {
  579. Sprite_Enemy.prototype.startBossCollapse.call(this);
  580. };
  581.  
  582. Sprite_EnemyRex.prototype.startInstantCollapse = function() {
  583. Sprite_Enemy.prototype.startInstantCollapse.call(this);
  584. };
  585.  
  586. Sprite_EnemyRex.prototype.updateEffect = function() {
  587.  
  588.  
  589.     this.setupEffect();
  590.     if (this._effectDuration > 0) {
  591.         this._effectDuration--;
  592.         switch (this._effectType) {
  593.         case 'whiten':
  594.             this.updateWhiten();
  595.             break;
  596.         case 'appear':
  597.             this.updateAppear();
  598.             break;
  599.         case 'disappear':
  600.             this.updateDisappear();
  601.             break;
  602.         case 'collapse':
  603.        if(this._actor._collapse)     this.updateCollapse();
  604.             break;
  605.         case 'bossCollapse':
  606.        if(this._actor._collapse)     this.updateBossCollapse();
  607.             break;
  608.         case 'instantCollapse':
  609.       if(this._actor._collapse)      this.updateInstantCollapse();
  610.             break;
  611.         }
  612.         if (this._effectDuration === 0) {
  613.             this._effectType = null;
  614.         }
  615.     }
  616. };
  617.  
  618.  
  619.  
  620. Sprite_EnemyRex.prototype.isEffecting = function() {
  621. Sprite_Enemy.prototype.isEffecting.call(this);
  622. };
  623.  
  624.  
  625.  
  626. Sprite_EnemyRex.prototype.revertToNormal = function() {
  627. Sprite_Enemy.prototype.revertToNormal.call(this);
  628. };
  629.  
  630. Sprite_EnemyRex.prototype.updateWhiten = function() {
  631. Sprite_Enemy.prototype.updateWhiten.call(this);
  632. };
  633.  
  634. Sprite_EnemyRex.prototype.updateBlink = function() {
  635. Sprite_Enemy.prototype.updateBlink.call(this);
  636. };
  637.  
  638. Rexal.ASVE.seupdateappear = Sprite_Enemy.prototype.updateAppear;
  639. Sprite_Enemy.prototype.updateAppear = function() {
  640.         Rexal.ASVE.seupdateappear.call(this);
  641.             this.setHome(this._homeX,this._homeY);
  642. };
  643.  
  644.  
  645. Rexal.ASVE.seupdatedisappear = Sprite_Enemy.prototype.updateDisappear;
  646.  
  647. Sprite_Enemy.prototype.updateDisappear = function() {
  648.                 Rexal.ASVE.seupdatedisappear.call(this);
  649.             this.setHome(this._homeX-10,this._homeY);
  650. };
  651.  
  652.  
  653. Sprite_EnemyRex.prototype.updateAppear = function() {
  654.         Sprite_Enemy.prototype.updateAppear.call(this);
  655. };
  656.  
  657. Sprite_EnemyRex.prototype.updateDisappear = function() {
  658.         Sprite_Enemy.prototype.updateDisappear.call(this);
  659. };
  660.  
  661.  
  662.  
  663. Sprite_EnemyRex.prototype.updateCollapse = function() {
  664. Sprite_Enemy.prototype.updateCollapse.call(this);
  665. };
  666.  
  667. Sprite_EnemyRex.prototype.updateBossCollapse = function() {
  668. Sprite_Enemy.prototype.updateBossCollapse.call(this);
  669. };
  670.  
  671. Sprite_EnemyRex.prototype.updateInstantCollapse = function() {
  672. Sprite_Enemy.prototype.updateInstantCollapse.call(this);
  673. };
  674.   //-----------------------------------------------------------------------------
  675. // Spriteset_Battle
  676. //=============================================================================
  677.  
  678. Spriteset_Battle.prototype.createEnemies = function() {
  679.  
  680.     var enemies = $gameTroop.members();
  681.     var sprites = [];
  682.     for (var i = 0; i < enemies.length; i++) {
  683.         var enemy = enemies[i];
  684.         var baseEnemy = $dataEnemies[enemies[i].enemyId()];
  685.  
  686.         Rexal.ASVE.processEnemyNoteTag(baseEnemy);
  687.         Rexal.ASVE.processEnemyData(enemy,baseEnemy);
  688.  
  689.     if(enemy._animated)  
  690.         {
  691.                 sprites[i] = new Sprite_EnemyRex(enemies[i]);
  692.                 sprites[i].opacity = 0;
  693.         }
  694.         else
  695.                 sprites[i] = new Sprite_Enemy(enemies[i]);
  696.  
  697.     }
  698.  
  699.     sprites.sort(this.compareEnemySprite.bind(this));
  700.     for (var j = 0; j < sprites.length; j++) {
  701.         this._battleField.addChild(sprites[j]);
  702.     }
  703.     this._enemySprites = sprites;
  704. };
  705.  
  706.   //-----------------------------------------------------------------------------
  707. // Rex Functions
  708. //=============================================================================
  709.  
  710. Object.defineProperties(Game_Enemy.prototype, {
  711.   animated: { get: function() { return this._animated; }, configurable: true },
  712.   weapon: { get: function() { return this._weapon; }, configurable: true },
  713.   sprite: { get: function() { return this._battleSprite; }, configurable: true },
  714.   motion: { get: function() { return this._motion; }, configurable: true },
  715.   weaponid: { get: function() { return this._weaponId; }, configurable: true },
  716.   breathless: { get: function() { return this._breathless; }, configurable: true },
  717.   floating: { get: function() { return this._float; }, configurable: true },
  718.   scale: { get: function() { return this._scale; }, configurable: true },
  719.   weaponscale: { get: function() { return this._weaponscale; }, configurable: true },
  720.   weaponanchor: { get: function() { return this._weaponanchor; }, configurable: true },
  721.   anchor: { get: function() { return this._anchor; }, configurable: true },
  722.   collapse: { get: function() { return this._collapse; }, configurable: true },
  723.   breath: { get: function() { return this._breath; }, configurable: true }
  724. });
  725.  
  726. Rexal.log = function(message,type){
  727. if(!Rexal.ASVE.Debug) return;
  728. if(!type) type = 'log';
  729.  
  730. switch (type) {
  731.  
  732.  
  733.         case 'log' :
  734.         console.log(message);
  735.         break;
  736.  
  737.         case 'info' :
  738.         console.debug(message);
  739.         break;
  740.  
  741.         case 'warn' :
  742.         console.warn(message);
  743.         break;
  744.  
  745.         case 'error' :
  746.         console.error(message);
  747.         break;
  748. }
  749.  
  750. }
  751.  
  752. Rexal.ASVE.processEnemyData = function(obj,obj2) {
  753. if(!obj._equips)obj._equips = [];
  754.         if(obj2.weapon){        obj._equips[0] = new Game_Item();
  755.         obj._equips[0].setObject(obj2.weapon);}
  756. obj._breath = [];
  757. obj._weaponAnchor = [];
  758. obj._anchor = [];
  759. obj._animated = obj2.animated;
  760. obj._battleSprite = obj2.battleSprite;
  761. obj._motion = obj2.motion;
  762. obj._weaponId = obj2.weaponid;
  763. obj._breathless = obj2.breathless;
  764. obj._floating = obj2.floating;
  765. obj._scale = obj2.scale;
  766. obj._breath[0] = obj2.breath[0];
  767. obj._breath[1] = obj2.breath[1];
  768. obj._breath[2] = obj2.breath[2];
  769. obj._collapse = obj2.collapse;
  770. obj._weaponScale = obj2.weaponscale;
  771. obj._weaponAnchor = obj2.weaponanchor;
  772. obj._anchor = obj2.anchor;
  773. }
  774.  
  775. Rexal.ASVE.processEnemyNoteTag = function(obj) {
  776. Rexal.log('reading ' + obj.name + '...');
  777. obj.battleSprite = "";
  778. obj.motion = 'thrust';
  779. obj.collapse = Rexal.ASVE.DoCollapse;
  780. obj.breath = [50,5,25];
  781. obj.scale = 1.0;
  782. obj.weaponscale = 0.0;
  783. obj.weaponanchor = [.5,1];
  784. obj.anchor = [.5,1];
  785.  
  786. if(obj == null)return;
  787.  
  788.                 var notedata = obj.note.split(/[\r\n]+/);
  789.  
  790.                 for (var i = 0; i < notedata.length; i++) {
  791.                 var line = notedata[i];
  792.                 var lines = line.split(': ');
  793.  
  794.                 switch (lines[0].toLowerCase()) {
  795.  
  796.                 case '[sv animated]' :
  797.         obj.animated = true;
  798.                 Rexal.log(obj.name + ' is using SV Battler sprites','info');
  799.                 break;
  800.  
  801.                 case 'sv sprite' :
  802.                 obj.animated = true;
  803.         obj.battleSprite = lines[1];
  804.                 Rexal.log(obj.name + ' is using SV Battler sprites','info');
  805.  
  806.                 break;
  807.  
  808.                 case 'sv motion' :
  809.         obj.motion = lines[1].toLowerCase();
  810.                 Rexal.log(obj.name + "'s attack motion is:" + obj.motion,'info');
  811.                 break;
  812.  
  813.                 case 'sv weapon' :
  814.                  obj.weapon = $dataWeapons[parseInt(lines[1])] ;
  815.                 Rexal.log(obj.weapon);
  816.                 break;
  817.  
  818.                 case '[breathless]' :
  819.         obj.breathless = true;
  820.                 Rexal.log(obj.name + " is breathless.",'info');
  821.                 break;       
  822.  
  823.                 case '[float]' :
  824.                 obj.floating = true;
  825.                 Rexal.log(obj.name + " floats.",'info');
  826.                 break;       
  827.  
  828.                 case '[collapse]' :
  829.                 obj.collapse = true;
  830.                 Rexal.log(obj.name + " can collapse.",'info');               
  831.                 break;       
  832.  
  833.                 case '[no collapse]' :
  834.                 obj.collapse = false;
  835.                 Rexal.log(obj.name + " cannot collapse.",'info');       
  836.                 break;
  837.  
  838.                 case 'breath control' :
  839.  
  840.                 var lines2 = lines[1].split(',');
  841.                 obj.breath[0] = parseInt(lines2[0]);
  842.                 obj.breath[1] = parseInt(lines2[1]);
  843.                 obj.breath[2] = parseInt(lines2[2]);
  844.                 Rexal.log(obj.name + "'s breath control: " + obj.breath,'info');
  845.                 break;
  846.  
  847.                 case 'enemy scale' :
  848.                 obj.scale = parseFloat(lines[1]);
  849.                 Rexal.log(obj.name + " is " + obj.scale +"x bigger than normal.",'info');
  850.                 break;
  851.  
  852.                 case 'sv weapon scale' :
  853.                 obj.weaponscale = parseFloat(lines[1])-1;
  854.                 Rexal.log(obj.name + "'s weapon is " + obj.scale +"x bigger than normal.",'info');
  855.                 break;               
  856.  
  857.                 case 'sv weapon anchor' :
  858.  
  859.                 var lines2 = lines[1].split(',');
  860.                 obj.weaponanchor[0] = parseFloat(lines2[0]);
  861.                 obj.weaponanchor[1] = parseFloat(lines2[1]);
  862.                 Rexal.log(obj.name + "'s weapon is anchored to " + obj.weaponanchor[0] +" and " + obj.weaponanchor[1],'info');
  863.                 break;               
  864.  
  865.                 case 'sv anchor' : //WIP
  866.  
  867.                 var lines2 = lines[1].split(',');
  868.                 obj.anchor[0] = parseFloat(lines2[0]);
  869.                 obj.anchor[1] = parseFloat(lines2[1]);
  870.                 Rexal.log(obj.name + " is anchored to " + obj.anchor[0] +" and " + obj.anchor[1],'info');
  871.                 break;               
  872.  
  873.                 }
  874.  
  875.  
  876.                 }
  877.                 return obj;
  878. };
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
497
在线时间
266 小时
注册时间
2015-12-8
帖子
873
3
发表于 2016-2-25 17:02:54 | 只看该作者
是你圖片反了,反轉一下圖片就可以了
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
18 小时
注册时间
2015-8-3
帖子
12
4
 楼主| 发表于 2016-2-25 18:35:27 | 只看该作者
小叮鈴 发表于 2016-2-25 17:02
是你圖片反了,反轉一下圖片就可以了

没有反啊。。。
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1239
在线时间
898 小时
注册时间
2014-12-4
帖子
379
5
发表于 2016-2-25 19:00:52 | 只看该作者
ytcdtdj 发表于 2016-2-25 18:35
没有反啊。。。

管他反没反 你把他反过来 他就正了呀
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
18 小时
注册时间
2015-8-3
帖子
12
6
 楼主| 发表于 2016-2-25 19:20:15 | 只看该作者
翻滚牛宝宝 发表于 2016-2-25 19:00
管他反没反 你把他反过来 他就正了呀

嗯,这也是没有办法的办法了
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
65
在线时间
385 小时
注册时间
2007-7-27
帖子
4106

开拓者

7
发表于 2016-2-26 01:13:33 | 只看该作者
添加SV雪碧
喷了,雪菜碧池东马小三

讲真,为啥不用yanfly的
http://yanfly.moe/2015/12/13/yep-44-animated-sideview-enemies/
吸吸
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
18 小时
注册时间
2015-8-3
帖子
12
8
 楼主| 发表于 2016-2-26 17:34:56 | 只看该作者
trentswd 发表于 2016-2-26 01:13
添加SV雪碧
喷了,雪菜碧池东马小三

因为yanfly全是英语看不懂在哪里下载。。。

点评

http://yanfly.moe/plugins/en/YEP_X_AnimatedSVEnemies.js  发表于 2016-2-26 19:28
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-7 16:28

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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