zoukankan      html  css  js  c++  java
  • cocos2d-x中对象的位置,旋转,缩放

    版权声明:本文为博主原创文章,未经博主同意不得转载。

    https://blog.csdn.net/cuit/article/details/26729633

    分为两种:

    • 缓动。IntervalAction
    • 瞬时。InstantAction

    位置变化的操作包含:
    • MoveBy/MoveTo
    • JumpBy/JumpTo
    • BezierBy/BezierTo
    • Place
    缩放的操作包含:
    • ScaleBy/ScaleTo
    旋转
    • RotateBy/RotateTo
    可见性
    • Show
    • Hide
    • Blink
    • ToggleVisibility
    透明度
    • FadeIn/FadeOut/FadeTo
    颜色
    • TintBy/TintTo
    比如:
    CCSprite *sprite = CCSprite::create("Images/grossini.png"); 
    sprite->setPosition(ccp(100, 100)); addChild(sprite); 
    CCMoveBy* act1 = CCMoveBy::create(0.5, ccp(100, 0)); 
    sprite->runAction(CCRepeat::create(act1, 1)); 


查看全文
  • 相关阅读:
    .Net语言 APP开发平台——Smobiler学习日志:Poplist控件在APP中的应用场景以及代码
    C++ STL 之 set 和 pair
    C++ STL 之 list
    安卓开发之数据库事务的使用
    安卓开发之sql语句增删改查2(利用谷歌封装好的API进行增删改查)
    安卓开发之SimpleAdapter的使用
    安卓开发之ArrayAdapter使用
    安卓开发之打气筒的使用
    安卓开发之ListView入门
    安卓开发之sql语句增删改查
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10550359.html
  • Copyright © 2011-2022 走看看