资源简介
利用cocos2dx写的A星自动寻路算法,为了大家能很好的理解,我画了程序流程图辅助大家理解算法。vs2012+cocos2dx 3.3 编写。
如果对于原理不太懂,可以到我的博客看原理,地址如下。
http://blog.csdn.net/u010946556/article/details/49027301

代码片段和文件信息
#include “AppDelegate.h“
#include “HelloWorldScene.h“
USING_NS_CC;
AppDelegate::AppDelegate()
{
}
AppDelegate::~AppDelegate()
{
}
bool AppDelegate::applicationDidFinishLaunching() {
// initialize director
auto director = Director::getInstance();
auto glview = director->getOpenGLView();
if(!glview) {
glview = GLViewImpl::createWithRect(“My Game“ Rect(0 0 640 480) 1);
//glview->setframeSize(320 320);
director->setOpenGLView(glview);
}
glview->setDesignResolutionSize(640 480 ResolutionPolicy::FIXED_WIDTH);
// turn on display FPS
director->setDisplayStats(false);
// set FPS. the default value is 1.0/60 if you don‘t call this
director->setAnimationInterval(1.0 / 60);
// create a scene. it‘s an autorelease object
auto scene = HelloWorld::createScene();
// run
director->runWithScene(scene);
return true;
}
// This function will be called when the app is inactive. When comes a phone callit‘s be invoked too
void AppDelegate::applicationDidEnterBackground() {
Director::getInstance()->stopAnimation();
// if you use SimpleAudioEngine it must be pause
}
// 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
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1405 2015-09-30 20:49 Classes\AppDelegate.cpp
文件 1284 2014-11-26 10:28 Classes\AppDelegate.h
文件 4593 2015-09-30 20:37 Classes\HelloWorldScene.cpp
文件 1324 2015-09-30 18:28 Classes\HelloWorldScene.h
文件 5442 2015-09-30 20:45 Classes\NinJa.cpp
文件 1790 2015-09-30 18:24 Classes\NinJa.h
文件 15925 2011-06-07 21:34 Resources\CatMaze.plist
文件 37328 2011-06-07 21:34 Resources\CatMaze.png
文件 707 2015-09-30 20:49 Resources\map\bgmap.tmx
文件 136166 2014-11-26 10:30 Resources\map\dg_grounds32.jpg
文件 1192 2015-09-21 21:02 Resources\map\NinJa.plist
文件 5947 2015-09-21 21:02 Resources\map\ninja.png
目录 0 2015-09-30 20:49 Resources\map
目录 0 2015-09-21 14:12 Classes
目录 0 2015-10-16 22:10 Resources
文件 241392 2015-10-16 22:04 a.jpg
----------- --------- ---------- ----- ----
454495 16
- 上一篇:2018 年成都人工智能前沿论坛总结
- 下一篇:AS3.0画板涂鸦板
相关资源
- cocos2dx经典三消游戏
- cocos2dx-3.0正式版源代码+完整资源 微信
- xxtea加解密工具win32
- Cocos2dx游戏源代码《萝莉快跑》
- UNITY自动寻路插件 A* Pathfinding Project
- Cocos2dx入门初级教程
- cocos2dx 3.3 跑酷游戏源代码和资源
- 三国跑酷cocos2dx3.2源码
- richer单机完毕源码
- 连连看 cocos2dx 源代码
- cocos2dx 大鱼吃小鱼游戏源代码
- cocos2dx 3.x 水波纹
- cocos2dx 捕鱼游戏代码可以在最新译成
- cocos2dx 3.4 拼图游戏 源代码及运行文件
- 王桂林老师 cocos2dx课件.pdf
- 奇怪大冒险完整项目源码
- cocos2dx 聊天框,带换行光标
- cocos2d-x 2048小游戏源码+素材
- 2.5D 地图Staggered Diamond Slide 坐标换算及
- Cocos2d-x滑雪游戏源码.zip
- Unity3D实现的角色攻击、移动待机死亡
- A星寻路插件
- cocos2dx+JS写的 棋牌 麻将源代码 客户端
- cocos2dx 塔防游戏
- cocos2dx射箭游戏
- Cocos2d-x时钟
- cocos2dx 3.4 俄罗斯方块 源代码及运行文
- KingdomRush(王国保卫战)声音资源
- 精品糖果三消游戏源码 cocos2dx3.10
- cocos2d-x API大全中文版2016
评论
共有 条评论