首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Flashpunk中使用"Motion“?

如何在Flashpunk中使用"Motion“?
EN

Stack Overflow用户
提问于 2013-05-12 21:48:17
回答 1查看 196关注 0票数 0

我知道这很过时。但我想知道如何使用flashpunk Motion类(Motion、linearMotion、CircularMotion等)。以及如何将其应用于实体。我到处都找过了,但似乎没有人写过。

谢谢。

EN

回答 1

Stack Overflow用户

发布于 2014-05-10 19:57:02

以下是使用CircularMotion的示例:

代码语言:javascript
复制
// 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);
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16508045

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档