cocos2d-x中精灵的属性
发布时间:2020-12-14 20:28:45 所属栏目:百科 来源:网络整理
导读:// This is how to create an spriteauto mySprite = Sprite::create("mysprite.png"); // this is how to change the properties of the spritemySprite-setPosition(Vec2(500,0)); mySprite-setRotation(40); mySprite-setScale(2.0); // sets scale X and
// This is how to create an sprite auto mySprite = Sprite::create("mysprite.png"); // this is how to change the properties of the sprite mySprite->setPosition(Vec2(500,0)); mySprite->setRotation(40); mySprite->setScale(2.0); // sets scale X and Y uniformly mySprite->setAchorVec2(0,0);
通过代码
mySprite->setRotation(40);对精灵的翻转进行设定, mySprite->setScale(2.0);将精灵进行缩放,
最后,所有的节点 通过代码 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- c# – 使用Wrapper对象来正确清理excel的互操作对象
- flex air 设置全屏 输入法失效
- Unity3d 新建xml 读取xml
- c# – 比较两个文件在互联网上是否相同
- c – QML ComboBox项目DropDownMenu样式
- c# – 如何在selenium中获取已经打开的IE浏览器句柄?
- ‘.’之间的区别和RUBY中的File.dirname(__ FILE__)
- ruby-on-rails – 什么是路由错误和rake路由错误?
- There is no Action mapped for namespace / and action na
- PostgreSQL中COUNT的各条件下(1亿条数据)例子