Hi can anybody please help me i am stuck on a problem and more than a week has passed i didnt find a solution please help me my problem is i want to develop a game something like angry birds and i am using cocos creator for level building and then i export it to my cocos2dx project all is working fine i can run the scene in cocos2dx but i am unable to call the update method in which i will run box2d simulation like world->Step(dt, velocityIterations, positionIterations); i have browse all over internet but dont found any solution
my cpp file is:
#ifndef GameScene_hpp
#define GameScene_hpp
#include <stdio.h>
#include “cocos2d.h”
#include <Box2D/Box2D.h>
#include “Definition.h”
#include “reader/CreatorReader.h”
USING_NS_CC;
class GameScene : public Scene
{
public :
Scene* createScene();
creator::CreatorReader* reader;
void update( float dt);
void init(Scene* scene);
CREATE_FUNC(GameScene);
};
#endif /* GameScene_hpp */
i have tried all method scheduleupdate() , scene->schedule(schedule_selector(GameScene::update),0.1);
but the update() function wont run and without it i cant use box2d physics
i have check it and it doesnt help still getting the same error i tried again by calling scene sheduler like this
scene->scheduleUpdate();
scene->schedule(CC_SCHEDULE_SELECTOR(GameScene::update), 0.5f);
by doing this scene run well without crash but still update not calling i have posted the project here https://github.com/ammar567/cocoscreator_to_cocos2dx_example please check it and help me
update: It looks like some source files are missing from the GitHub repo visibleRect.h, other Box2d files and also graphic some resources. I’m trying to comment out to build, but I’m unsuccessful.