【问题标题】:How to use "Motion" in Flashpunk?如何在 Flashpunk 中使用“Motion”?
【发布时间】:2013-05-12 13:48:16
【问题描述】:

我知道这已经过时了。但我想知道如何使用 flashpunk Motion 类(Motion、linearMotion、CircularMotion 等)以及如何将其应用于实体。我在任何地方都搜索过,但似乎没有人写它。

谢谢。

【问题讨论】:

    标签: actionscript-3 motion


    【解决方案1】:

    以下是使用 CircularMotion 的示例:

    // Create a new Circular Motion
    var motion :CircularMotion = new CircularMotion();
    
    // Set the motion properties
    motion.setMotion(100, // centerX
            100, //centerY
            50, //angle
            90, //start angle
            true, //is motion clockwise
            20); //motion duration
    
    // The object we would like to tween            
    motion.object = this; 
    
    // Begin the motion
    addTween(motion, true);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-28
      • 1970-01-01
      • 1970-01-01
      • 2020-10-07
      相关资源
      最近更新 更多