摘要:roleSpritemapmap:addChild(roleSprite) //角色加在地图上,先设置role的位置,再调用下面函数设置地图位置roleSprite:setPotion()void setSceneScrollPosition() { CCPoint position = roleSprite->getPosition(); CCSize screenSize = CCDirector::sharedDirector()->getWinSize(); CCSize mapSizeInPixel = CCSizeMake(map->getMapSize()...
阅读全文
摘要:Android 环境搭建不详述,,可以google,,,我用的coco2dx 是 2.14 ,2.14 用create_project.py 脚本创建工程,Python环境配置也是很简单,这里了不说了,Python环境搭好后:cmd 进入create_project.py目录(1)D: //切换盘符,因为我的Cocos2d-x源码在D盘...(2)cd D:\cocos2d-x-2.1.4\cocos2d-x-2.1.4\tools\project-creator //进入到create_project.py脚本所在目录(3)运行脚本,生成HelloWorld项目,命令为:python cre
阅读全文
摘要:win7+cocos2d-x-2.1.4+vs2012环境太简单就不多说了,下面是eclipse环境一、准备1.eclipse+adt+sdk:adt-bundle-windows-x86_64-20130729.ziphttp://dl.google.com/android/adt/adt-bundle-windows-x86_64-20130729.zip2.ndk:android-ndk-r8e-windows-x86_64.ziphttp://dl.google.com/android/ndk/android-ndk-r8e-windows-x86_64.zip或android-ndk
阅读全文