cocos2d-x 3.x学习之RotateAction
来源:互联网 发布:mac怎么安装第三方软件 编辑:程序博客网 时间:2024/06/05 18:10
#include"RotateActionScene.h"Scene* RotateAction::createScene(){auto scene = Scene::create();auto layer = RotateAction::create();scene->addChild(layer);return scene;}bool RotateAction::init(){if (!Layer::init()){return false;}Size visibleSize = Director::getInstance()->getVisibleSize();auto dance = Sprite::create("dance.png");dance->setPosition(Point(visibleSize.width / 2, visibleSize.height / 2));this->addChild(dance);auto left = Sprite::create("dance.png");left->setPosition(Point(visibleSize.width / 2 - 300, visibleSize.height / 2));this->addChild(left);auto rotateTo1 = RotateTo::create(2, 45);auto rotateTo2 = RotateTo::create(2, 90);left->runAction(Sequence::create(rotateTo1, rotateTo2, NULL));auto right = Sprite::create("dance.png");right->setPosition(Point(visibleSize.width / 2 + 300, visibleSize.height / 2));this->addChild(right);auto rotateBy1 = RotateBy::create(2, 45);auto rotateBy2 = RotateBy::create(2, 90);right->runAction(Sequence::create(rotateBy1, rotateBy2, NULL));return false;}
0 0
- cocos2d-x 3.x学习之RotateAction
- cocos2d-x 3.x学习之SpriteFrameCache
- cocos2d-x 3.x学习之ShowAction
- cocos2d-x 3.x学习之FadeAction
- cocos2d-x 3.x学习之TintAction
- cocos2d-x 3.x学习之MoveAction
- cocos2d-x 3.x学习之JumpAction
- cocos2d-x 3.x学习之ScaleAction
- cocos2d-x 3.x学习之ActionCombination
- cocos2d-x 3.x学习之ActionEaseTest
- cocos2d-x 3.x学习之MenuItem
- cocos2d-x 3.x学习之进度条
- cocos2d-x 3.x学习之Vector常用函数
- cocos2d-x 3.x学习之TouchOneByOne单点触摸
- cocos2d-x 3.x学习之拖动滑块类
- cocos2d-x 3.x学习之声音系统
- cocos2d-x 3.x学习之屏幕适配
- cocos2d-x 3.x学习之虚拟摇杆
- 修饰符
- MYSQL多层面优化总结
- Gray Code
- leetcode 287. Find the Duplicate Number
- httpUtils网络请求
- cocos2d-x 3.x学习之RotateAction
- [Android Studio] Android studio 多渠道打包(超简洁版)
- hdu 2227(树状数组优化dp)
- HDU 3474 单调队列
- 【Apache Shiro】学习笔记——Authentication基础
- Android Studio – 使用百度地图SDK教程
- 漫谈deepcopy(深拷贝)和shallowcopy(浅拷贝)
- Gradle 多渠道打包实践
- 第16周阅读程序4(2)