上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 43 下一页
摘要: 如果不设置reslovedesign,的话,只设置framesize,会表现为原始的像素级别就是,800*600.framesize只是窗口的大小,如果只设置窗口的大小,像素会聚集在一起。如果是400*300,那么点击右上角获取到的位置还是800*600 阅读全文
posted @ 2014-12-28 11:40 yufenghou 阅读(157) 评论(0) 推荐(0)
摘要: auto animation = Animation::create(); animation->addSpriteFrameWithFile("NPC/hero.png"); animation->addSpriteFrameWithFile("NPC/hero1.png")... 阅读全文
posted @ 2014-12-28 09:03 yufenghou 阅读(415) 评论(0) 推荐(0)
摘要: 做碰撞检测的时候,首先把opengl的坐标点转化为tiledmap的 tiled 坐标,然后从layer中看这个地方的精灵,如果这个地方有精灵不嫩通过。 阅读全文
posted @ 2014-12-28 08:19 yufenghou 阅读(224) 评论(0) 推荐(0)
摘要: auto map=TMXTiledMap::create("map/map.tmx"); addChild(map); TMXLayer* layer=map->getLayer("layer"); for(int i=0;igetTileGIDAt(Point(i,3))... 阅读全文
posted @ 2014-12-27 15:54 yufenghou 阅读(445) 评论(0) 推荐(0)
摘要: auto listener=EventListenerTouchOneByOne::create(); listener->onTouchBegan=[this,visibleSize](Touch* touch,Event* event){ auto s... 阅读全文
posted @ 2014-12-23 13:53 yufenghou 阅读(151) 评论(0) 推荐(0)
摘要: import os dir = 'D:/hero/Classes'def readfile(dir): str="" first_line=1 for f in os.listdir(dir): file = os.path.join(dir, f) ... 阅读全文
posted @ 2014-12-20 10:25 yufenghou 阅读(183) 评论(0) 推荐(0)
摘要: auto sp=Sprite::create("hero.png"); sp->setPosition(visibleSize.width/2,visibleSize.height/2); addChild(sp); auto pa=Parabola::create(1,s... 阅读全文
posted @ 2014-12-16 13:47 yufenghou 阅读(204) 评论(0) 推荐(0)
摘要: FiniteTimeAction *actionOne = Sequence::create( CCScaleTo::create(1.0f,0.5f,1.5f), CCFadeIn::create(1.0f), CCCallFunc::create(thi... 阅读全文
posted @ 2014-12-16 10:56 yufenghou 阅读(249) 评论(0) 推荐(0)
摘要: #pragma once#include "cocos2d.h"USING_NS_CC;class Parabola:public ActionInterval{public: static Parabola* create(const CCPoint& startPosition, cons... 阅读全文
posted @ 2014-12-15 23:17 yufenghou 阅读(524) 评论(0) 推荐(0)
摘要: #pragma once#include "cocos2d.h"USING_NS_CC;typedef struct _EclipseConfig { //中心点坐标 CCPoint centerPosition; //椭圆a长,三角斜边 float aLen... 阅读全文
posted @ 2014-12-15 16:24 yufenghou 阅读(417) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 43 下一页