【问题标题】:Libgdx | Scene2d | How to use actions on an animationLibgdx |场景2d |如何在动画上使用动作
【发布时间】:2023-03-18 18:00:01
【问题描述】:

如何在动画上使用动作(例如...淡入/淡出)?我是否必须一次在动画中的每个单独纹理上设置淡入/淡出?

【问题讨论】:

    标签: java android libgdx scene2d


    【解决方案1】:

    将动画添加到 Actor 并在其上添加动作。

    public class AnimationWithAction extends Actor {
        Animation animation = new Animation(5, textures);
    }
    
    AnimationWithAction anim = new AnimationWithAction();
    anim.addAction(youraction);
    

    【讨论】:

      猜你喜欢
      • 2015-04-25
      • 2016-12-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多