egret-docs-master/Lakeshore/manual/behavior/rotation/README.md

26 lines
1.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

![](564c2a211ef6d.png)
应用了旋转行为的实例会自发的以指定速度旋转。旋转中心为实例锚点。
### 属性面板:
![](5633052052ba6.png)
- 速度:旋转的速度(单位:度/秒。默认值为180。值为正时为顺时针旋转。值为负时为逆时针旋转。
- 加速度旋转的加速度。默认值为0此时为匀速旋转。值为正时是顺时针加速度对逆时针旋转就是减速度值为负时是顺时针减速度对逆时针旋转就是加速度。例如速度为180加速度为-10那么实例就会先以180度/秒顺时针旋转但越转越慢。速度为0后便开始逆时针旋转并越转越快。
------------
### 旋转条件
旋转行为没有特有条件。
------------
### 旋转动作
![](563305200cf38.png)
#### 旋转速度
设置旋转的速度。
![](5633052043608.png)
#### 旋转加速度
设置旋转的加速度。
![](5633052035b49.png)
#### 启用/禁用
设置旋转行为是否可用。
![](563305202a1af.png)