Hello everyone, i just start learning Cocos2dx in Windows. I use Visual Studio and Cocos2d-x-2.2.2. I understood HelloWorld example and i can change the spite, change the text… But now i want to create my own example, just add a sprite and move it or using some easy action… I searched a lot of keywords about Cocos2dx C++ but i don’t find anythings, most of them are written for iOs platform and i can’t use it. So please help me to write my own example.
P/s: Sorry for my English, i don’t use it frequently.
In HelloWorld.cpp, the very essentials:
CCSprite *mySprite = CCSprite::create("spriteName.png");
- add the sprite to the scene
addChild(mySprite);
mySprite->runAction(CCMoveBy::create(ccp(1000, 1000)));
And the link ‘fabrice’ provided as well, to go into more details
Have fun!
davidejones88 wrote:
In HelloWorld.cpp, the very essentials:
CCSprite *mySprite = CCSprite::create("spriteName.png");
- add the sprite to the scene
addChild(mySprite);
mySprite->runAction(CCMoveBy::create(ccp(1000, 1000)));
And the link ‘fabrice’ provided as well, to go into more details
Have fun!
I think your instruction so easy to understand :). Thank u!