axmol/template/xcode3/cocos2d-x_box2d_app/Classes/HelloWorldScene.h

34 lines
848 B
C
Raw Normal View History

2011-01-15 15:15:22 +08:00
//
// HelloWorldScene.h
// ___PROJECTNAME___
//
// Created by ___FULLUSERNAME___ on ___DATE___.
// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
//
#ifndef __HELLO_WORLD_H__
#define __HELLO_WORLD_H__
// When you import this file, you import all the cocos2d classes
#include "cocos2d.h"
#include "Box2D.h"
class HelloWorld : public cocos2d::CCLayer {
public:
~HelloWorld();
HelloWorld();
// returns a Scene that contains the HelloWorld as the only child
static cocos2d::CCScene* scene();
// adds a new sprite at a given coordinate
2011-03-10 11:59:17 +08:00
void addNewSpriteWithCoords(cocos2d::CCPoint p);
2011-01-15 15:15:22 +08:00
virtual void draw();
2011-03-18 09:39:34 +08:00
virtual void ccTouchesEnded(cocos2d::CCSet* touches, cocos2d::CCEvent* event);
2011-01-15 15:15:22 +08:00
void tick(cocos2d::ccTime dt);
private:
b2World* world;
};
#endif // __HELLO_WORLD_H__