古树旋律 发表于 2023-3-8 15:55:28

粗暴地去掉MZ的战斗动画播放

管理播放动画的代码在sprites.js中,搜索下面代码,然后注释掉范例部分即可。


Spriteset_Base.prototype.createAnimation = function(request) {
    const animation = $dataAnimations;
    const targets = request.targets;
    const mirror = request.mirror;
    let delay = this.animationBaseDelay();
    const nextDelay = this.animationNextDelay();
    // if (this.isAnimationForEach(animation)) {
    //   for (const target of targets) {
    //         this.createAnimationSprite(, animation, mirror, delay);
    //         delay += nextDelay;
    //   }
    // } else {
    //   this.createAnimationSprite(targets, animation, mirror, delay);
    // }
};
这种简单粗暴的方式是直接关闭掉了战斗中的动画演出,及命令角色使用某个技能后,直接弹出伤害数字或者效果。单纯这样修改会极大影响游戏体验。建议结合if判定,通过按钮、系统设置、开关等方式让玩家自主决定是否屏蔽动画。

古树旋律 发表于 2023-3-8 16:41:11



录制了2个范例。当启动“加速”时,就不会播放动画。但关闭加速时,则正常播放动画。

古树旋律 发表于 2023-3-8 22:34:34

https://pic.imgdb.cn/item/64089cdbf144a01007fd7465.gif
原来图床是这样用的,奇奇怪怪的知识点又增加了
页: [1]
查看完整版本: 粗暴地去掉MZ的战斗动画播放