mirror of https://github.com/axmolengine/axmol.git
34 lines
848 B
C++
34 lines
848 B
C++
//
|
|
// 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
|
|
void addNewSpriteWithCoords(cocos2d::CCPoint p);
|
|
virtual void draw();
|
|
virtual void ccTouchesEnded(cocos2d::CCSet* touches, cocos2d::CCEvent* event);
|
|
void tick(cocos2d::ccTime dt);
|
|
|
|
private:
|
|
b2World* world;
|
|
};
|
|
|
|
#endif // __HELLO_WORLD_H__
|