优化战斗动画
This commit is contained in:
parent
0a9e8383f6
commit
c18057e927
@ -282,7 +282,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
"afterBattle": function (enemyId, x, y) {
|
"afterBattle": async function (enemyId, x, y) {
|
||||||
// 战斗结束后触发的事件
|
// 战斗结束后触发的事件
|
||||||
var enemy = core.getEnemyInfo(enemyId, hero, x, y)
|
var enemy = core.getEnemyInfo(enemyId, hero, x, y)
|
||||||
var special = enemy.special;
|
var special = enemy.special;
|
||||||
@ -295,21 +295,21 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
animate = core.material.items[equipId].equip.animate;
|
animate = core.material.items[equipId].equip.animate;
|
||||||
// 你也可以在这里根据自己的需要,比如enemyId或special或flag来修改播放的动画效果
|
// 你也可以在这里根据自己的需要,比如enemyId或special或flag来修改播放的动画效果
|
||||||
// if (enemyId == '...') animate = '...';
|
// if (enemyId == '...') animate = '...';
|
||||||
|
if (core.getFlag('noAnimate')) {
|
||||||
|
// 检查该动画是否存在SE,如果不存在则使用默认音效
|
||||||
|
if (!(core.material.animates[animate] || {}).se)
|
||||||
|
core.playSound('attack.mp3');
|
||||||
|
|
||||||
// 检查该动画是否存在SE,如果不存在则使用默认音效
|
// 播放动画;如果不存在坐标(强制战斗)则播放到勇士自身
|
||||||
if (!(core.material.animates[animate] || {}).se)
|
if (x != null && y != null)
|
||||||
core.playSound('attack.mp3');
|
core.drawAnimate(animate, x, y);
|
||||||
|
else
|
||||||
// 播放动画;如果不存在坐标(强制战斗)则播放到勇士自身
|
core.drawHeroAnimate(animate);
|
||||||
if (x != null && y != null)
|
}
|
||||||
core.drawAnimate(animate, x, y);
|
|
||||||
else
|
|
||||||
core.drawHeroAnimate(animate);
|
|
||||||
|
|
||||||
// 获得战斗伤害信息
|
// 获得战斗伤害信息
|
||||||
var damageInfo = core.getDamageInfo(enemyId, null, x, y) || {};
|
var damageInfo = core.getDamageInfo(enemyId, null, x, y) || {};
|
||||||
|
|
||||||
if (!core.getFlag("noAnimate")) core.attackAnimate(
|
if (!core.getFlag("noAnimate")) await core.attackAnimate(
|
||||||
enemyId,
|
enemyId,
|
||||||
damageInfo.start[0],
|
damageInfo.start[0],
|
||||||
damageInfo.start[1],
|
damageInfo.start[1],
|
||||||
|
3572
project/plugins.js
3572
project/plugins.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user