Cocos2d-x 3.2 Action Action

Source: Internet
Author: User

This article refers to the (eight) Action (action) in the Cocos2d-x v3.2 learning note.

Action has three sub-classes:

1.finitetimeaction class: The base class for all actions (action) that can be completed at a limited time.

2,Follow class: A "Follow" a certain node of the action.

3. Speed class: Change the operation of an action so that he lasts longer (speed>1) or shorter (speed<1). (The Speed object cannot be part of an action sequence because it is not a Actioninterval object)

Secondly, the Finitetimeaction class is divided into two kinds of action classes which can be completed in finite time.

1, Actioninstant Instant action. Unlike Actioninterval, instant action has no duration.

12345678910 CallBack    调用一个 ‘callback‘函数。FlipX      精灵水平翻转。FlipY      精灵垂直翻转。Hide       隐藏节点。Place      放置节点到某个位置。RemoveSelf    移除节点ReuseGrid    重复网格动作。Show       显示节点。StopGrid    停止网格动作。ToggleVisibility  切换节点的可视属性。

2, Actioninterval continuous action is the need to keep running for a period of time action. It has a start time and an end time. The end time is derived from the start time plus the cycle.

The duration consists of many interesting features, such as:

    • Works correctly (default)

    • can also run in reverse

    • Can be run with an accelerator change

12345678910111213141516171819202122232425262728293031323334353637 AccelAmplitude      //振幅动作。AccelDeccelAmplitude   //振幅动作。ActionCamera      //摄相机动作基类(子类OrbitCamera—视角按照球面坐标轨迹 围绕屏幕中心进行旋转)。ActionEase        //缓和动作基础类。Animate         //创建序列帧动画。BezierBy        //贝塞尔曲线动作。Blink           //闪烁动作。CardinalSplineTo     //基础曲线路径。CatmullRomTo      //这是一个按照CatmullRom曲线移动目标点的动作。这个Catmull Rom曲线路径的弧度为0.5。CardinalSplineBy     //基础曲线路径。CatmullRomBy      //这是一个按照笛卡尔曲线移动目标点的动作。这个笛卡尔曲线路径的弧度为0.5。DeccelAmplitude     //振幅动作。DelayTime        //延时动作。FadeTo          //渐变动作。不支持"reverse"。FadeIn          //渐变动作 "reverse"动作是FadeOut。FadeOut         //渐变动作 "reverse"动作是FadeIn。GridAction         //网格(grid)动作的基类。JumpBy          //模仿跳跃的轨迹移动节点。JumpTo          //模仿跳跃的轨迹移动节点。MoveBy          //通过修改节点对象的位置属性来改变节点对象的x,y像素。 x,y的坐标是相对于这个对象的位置来说的。 几个MoveBy动作可以同时被调用,最终的运动是这几个单独运动的综合。MoveTo          //通过修改节点对象的位置属性来改变节点对象的x,y像素。 x,y的坐标是相对于这个对象的位置来说的。 几个MoveBy动作可以同时被调用,最终的运动是这几个单独运动的综合。ProgressFromTo      //从一个百分比到另一个百分比的动画。ProgressTo        //百分比进度。Repeat          //重复执行动作很多次。次数由参数决定。 要无线循环动作,使用RepeatForever。RepeatForever      //无线循环一个动作。 如果要循环有限次数,请使用Repeat动作。(这个动作不能被用于串行,因为它不是一个持续动作)ReverseTime       //反转动作。(小心使用这个动作,这个动作不能用在串行动作序列中)RotateBy         //旋转一个节点。RotateTo         //旋转节点到指定角度。 方向将通过最短角决定。ScaleTo          //缩放动作。ScaleBy          //缩放动作 。Sequence         //顺序执行动作。SkewTo          //通过修改节点对象的skewX和skewY属性来使节点对象倾斜到一个给定的角度。SkewBy          //通过skewX和skewY的度数来事节点对象倾斜。Spawn           //并行动作。TargetedAction      //改写一个动作的目标,让这个动作可以在动作创建的时候运行在一个指定的目标上,而不是运行在通过runAction指定的目标。TintBy           //节点变色动作。TintTo           //节点变色动作。

Recommended reading:

Official documents Action (actions)

Cocos2d-x 3.2 Action Action

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.