我用的是3.3rc0版本的,调试几次有几个错误我解决不来了,先说明我是新手。我做的是一个超级玛丽的游戏
警告 1 warning C4996: ‘cocos2d::CCMenuItem’: 被声明为已否决 g:\dev\devproject\workspace\maliya\classes\mainmenu.h 13 1 MyGame
警告 2 warning C4996: ‘cocos2d::CCMenuItem’: 被声明为已否决 g:\dev\devproject\workspace\maliya\classes\mainmenu.h 14 1 MyGame
警告 3 warning C4996: ‘cocos2d::CCMenuItem’: 被声明为已否决 g:\dev\devproject\workspace\maliya\classes\mainmenu.h 15 1 MyGame
警告 4 warning C4996: ‘cocos2d::CCMenuItem’: 被声明为已否决 g:\dev\devproject\workspace\maliya\classes\mainmenu.h 16 1 MyGame
#include “SimpleAudioEngine.h”
#include “GameLayer.h”
#include “MainMenu.h”
#include “AnimationManager.h”
#include “Global.h”
USING_NS_CC;
using namespace CocosDenshion;
AppDelegate::AppDelegate() {
}
AppDelegate::~AppDelegate()
{
SimpleAudioEngine::end();
}
bool AppDelegate::applicationDidFinishLaunching() {
// initialize director
auto director = Director::getInstance();
auto glview = director->getOpenGLView();
if(!glview) {
glview = GLView::create(“My Game”);
director->setOpenGLView(glview);
glview->setDesignResolutionSize(480, 320, kResolutionShowAll);
}
// turn on display FPS
director->setDisplayStats(true);
// set FPS. the default value is 1.0/60 if you don't call this
director->setAnimationInterval(1.0 / 60);
AnimationManager::getInstance()->initAnimationMap();
// create a scene. it's an autorelease object
auto scene = Scene::create();
scene->addChild(MainMenu::create());
// run
director->runWithScene(scene);
return true;
}
// This function will be called when the app is inactive. When comes a phone call,it’s be invoked too
void AppDelegate::applicationDidEnterBackground() {
Director::getInstance()->stopAnimation();
// if you use SimpleAudioEngine, it must be pause
// SimpleAudioEngine::getInstance()->pauseBackgroundMusic();
}
// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground() {
Director::getInstance()->startAnimation();
// if you use SimpleAudioEngine, it must resume here
// SimpleAudioEngine::getInstance()->resumeBackgroundMusic();
}
请把代码粘贴在这里 ```