Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
我想做个效果就是:当角色移动到敌人一定范围时,敌人才转换为攻击的动画,当角色又移开一段距离后敌人就转换回待机状态。这样的效果该如何实现。
可以给敌人加一个“视线”能力,然后用条件判断角色是否在敌人视线内(也就是一定范围内),然后用动作切换为攻击动画,否则(也就是角色不在敌人视线内)就切换为待机动画
谢谢解答,困扰好久了。