代码改变世界

随笔分类 -  cocos2d-js

屏幕中心(中央)定位到某一瓦片;瓦片地图结尾处修饰

2015-11-25 15:57 by 潇洒肥猫, 356 阅读, 收藏,
摘要: (一)Scrolling the Isometric TilemapWith the tilePosFromLocation method updated to work with isometric tilemaps, theTilemap06 project continues by imple... 阅读全文

google: 关键字 cocos2d coc 材料

2015-11-25 09:23 by 潇洒肥猫, 182 阅读, 收藏,
摘要: 仿COC的小Demohttps://github.com/shahdza/Cocos_Ring[置顶]Cocos2d-x 类COC手游与RTS(即时战略)游戏的编程实践总结http://blog.csdn.net/StevenKyleLee/article/details/39318543思路总结 阅读全文

根据触摸点的坐标返回瓦片坐标 Locating an Isometric Tile

2015-11-25 00:02 by 潇洒肥猫, 399 阅读, 收藏,
摘要: 《Learn iPhone and iPad Cocos2D Game Development》1. 根据触摸点的坐标返回瓦片坐标。//根据触摸点的位置计算瓦片坐标-(CGPoint) tilePosFromLocation:(CGPoint)location tileMap:(CCTMXTil... 阅读全文

Cocos2d-JS中访问瓦片地图API及其坐标变换方法

2015-11-24 16:36 by 潇洒肥猫, 1528 阅读, 收藏,
摘要: ????????????????????????????????????????????????????????tmx的x坐标 = 地图高 - y/瓦片高 + x/瓦片宽 -地图宽/2;tmx的y坐标 = 地图高 - y/瓦片高 - x/瓦片宽 +地图宽/2。????????????????????... 阅读全文

直角瓦片地图坐标转换算法记录(OC)

2015-11-24 15:50 by 潇洒肥猫, 488 阅读, 收藏,
摘要: 瓦片地图-(void) ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ CCNode* node = [self getChildByTag:TileMapNode]; CCTMXTiledMap* tileMap ... 阅读全文

cocos2d-js的一些坑

2015-11-20 11:20 by 潇洒肥猫, 521 阅读, 收藏,
摘要: 1. *.pvr.ccz 只原生平台才支持,网页版本不支持,调试半天才查到,囧2. 之前sys.os 等api在V3后失效,以下备查cc.Director.getInstance is not a function必须改用cc.director.var audioEngine = cc.AudioE... 阅读全文