资源简介

cocos2d-x的塔防实现,只实现了基本的建造,出怪,打怪,其他需要的自己完善,图片不是很好看。

资源截图

代码片段和文件信息

#include “AppDelegate.h“

#include “cocos2d.h“
#include “SimpleAudioEngine.h“
using namespace CocosDenshion;


#include “HelloWorldScene.h“

#include “CCEGLView.h“

USING_NS_CC;

AppDelegate::AppDelegate()
{
}

AppDelegate::~AppDelegate()
{
    SimpleAudioEngine::end();
}

bool AppDelegate::initInstance()
{
    bool bRet = false;
    do
    {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)

// Initialize OpenGLView instance that release by CCDirector when application terminate.
// The HelloWorld is designed as HVGA.
CCEGLView * pMainWnd = new CCEGLView();
CC_BREAK_IF(! pMainWnd
|| ! pMainWnd->Create(TEXT(“cocos2d: Hello World“) 800 480));

#endif  // CC_PLATFORM_WIN32

#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)

        // OpenGLView initialized in testsAppDelegate.mm on ios platform nothing need to do here.

#endif  // CC_PLATFORM_IOS

#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)

// OpenGLView initialized in HelloWorld/android/jni/helloworld/main.cpp
// the default setting is to create a fullscreen view
// if you want to use auto-scale please enable view->create(320480) in main.cpp
// if the resources under ‘/sdcard“ or other writeable path set it.
// warning: the audio source should in assets/
// cocos2d::CCFileUtils::setResourcePath(“/sdcard“);

#endif  // CC_PLATFORM_ANDROID

#if (CC_TARGET_PLATFORM == CC_PLATFORM_WOPHONE)

// Initialize OpenGLView instance that release by CCDirector when application terminate.
// The HelloWorld is designed as HVGA.
CCEGLView* pMainWnd = new CCEGLView(this);
CC_BREAK_IF(! pMainWnd || ! pMainWnd->Create(320480 WM_WINDOW_ROTATE_MODE_CW));

#ifndef _TRANZDA_VM_
// on wophone emulator we copy resources files to Work7/NEWPLUS/TDA_DATA/Data/ folder instead of zip file
cocos2d::CCFileUtils::setResource(“HelloWorld.zip“);
#endif

#endif  // CC_PLATFORM_WOPHONE
#if (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE)
// MaxAksenov said it‘s NOT a very elegant solution. I agree haha
CCDirector::sharedDirector()->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft);
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)

// Initialize OpenGLView instance that release by CCDirector when application terminate.
// The HelloWorld is designed as HVGA.
CCEGLView * pMainWnd = new CCEGLView();
CC_BREAK_IF(! pMainWnd
|| ! pMainWnd->Create(“cocos2d: Hello World“ 800 480480 320));

CCFileUtils::setResourcePath(“../Resource/“);

#endif  // CC_PLATFORM_LINUX

#if (CC_TARGET_PLATFORM == CC_PLATFORM_BADA)

CCEGLView * pMainWnd = new CCEGLView();
CC_BREAK_IF(! pMainWnd|| ! pMainWnd->Create(this 480 320));
pMainWnd->setDeviceOrientation(Osp::Ui::ORIENTATION_LANDSCAPE);
CCFileUtils::setResourcePath(“/Res/“);

#endif  // CC_PLATFORM_BADA

#if (CC_TARGET_PLATFORM == CC_PLATFORM_QNX)
CCEGLView * pMainWnd = new CCEGLView();
CC_BREAK_IF(! pMainWnd|| ! pMainWnd->Create(4

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4360  2013-03-21 17:18  WIN_TD\Classes\AppDelegate.cpp

     文件       1129  2013-01-05 10:29  WIN_TD\Classes\AppDelegate.h

     文件       2019  2013-01-06 09:21  WIN_TD\Classes\BeginScene.cpp

     文件        391  2013-01-05 14:40  WIN_TD\Classes\BeginScene.h

     文件       1341  2013-01-06 13:34  WIN_TD\Classes\CanBuildTurretMenu.cpp

     文件        528  2013-01-05 17:25  WIN_TD\Classes\CanBuildTurretMenu.h

    .......         0  2009-08-31 02:32  WIN_TD\Classes\CheckpointScene.cpp

    .......         0  2009-08-31 02:32  WIN_TD\Classes\CheckpointScene.h

     文件       2117  2013-01-09 15:54  WIN_TD\Classes\Common.cpp

     文件        787  2013-01-09 15:54  WIN_TD\Classes\Common.h

     文件       3374  2013-01-05 13:54  WIN_TD\Classes\HelloWorldScene.cpp

     文件        664  2013-01-05 13:50  WIN_TD\Classes\HelloWorldScene.h

     文件       1635  2013-01-07 15:08  WIN_TD\Classes\MonsterSprite.cpp

     文件        841  2013-01-07 11:44  WIN_TD\Classes\MonsterSprite.h

     文件       1394  2013-01-09 16:06  WIN_TD\Classes\RunGameScene.cpp

     文件        337  2013-01-09 15:57  WIN_TD\Classes\RunGameScene.h

     文件       9950  2013-01-09 17:25  WIN_TD\Classes\TiledMap.cpp

     文件       1604  2013-01-09 16:15  WIN_TD\Classes\TiledMap.h

     文件       3041  2013-01-09 17:21  WIN_TD\Classes\TurretSprite.cpp

     文件        955  2013-01-07 15:06  WIN_TD\Classes\TurretSprite.h

     文件      94417  2013-03-21 17:18  WIN_TD\Debug.win32\AppDelegate.obj

     文件     103119  2013-01-09 17:23  WIN_TD\Debug.win32\baseDrawlayer.obj

     文件     110259  2013-01-09 15:57  WIN_TD\Debug.win32\BeginScene.obj

     文件      88865  2013-01-09 16:17  WIN_TD\Debug.win32\CanBuildTurretMenu.obj

     文件       1827  2013-01-05 15:14  WIN_TD\Debug.win32\CheckpointScene.obj

     文件      13994  2013-03-21 17:18  WIN_TD\Debug.win32\cl.command.1.tlog

     文件     387346  2013-03-21 17:18  WIN_TD\Debug.win32\CL.read.1.tlog

     文件      15272  2013-03-21 17:18  WIN_TD\Debug.win32\CL.write.1.tlog

     文件      86073  2013-01-09 15:57  WIN_TD\Debug.win32\Common.obj

     文件     107004  2013-01-05 14:41  WIN_TD\Debug.win32\HelloWorldScene.obj

............此处省略182个文件信息

评论

共有 条评论