摘要: 不多说,上源码,setFrameSize这个函数大家都比较熟悉吧,没错,main函数中的关键函数,定义了游戏窗口的大小,但是它可不只是定义窗口大小的。void CCEGLView::setFrameSize(float width, float height){ bool eResult = false; int u32GLFWFlags = GLFW_WINDOW; //create the window by glfw. //check CCAssert(width!=0&&height!=0, "invalid window's size equal 0 阅读全文
posted @ 2013-07-01 23:39 walkabc 阅读(605) 评论(0) 推荐(0) 编辑
摘要: 太晚了,先放上源码再说。 #include "Paddle.h"Paddle::Paddle(void){}Paddle::~Paddle(void){}CCRect Paddle::rect(){ CCSize s = getTexture()->getContentSize(); return CCRectMake(-s.width / 2, -s.height / 2, s.width, s.height);}Paddle* Paddle::paddleWithTexture(CCTexture2D* aTexture){ Paddle* pPaddle = n 阅读全文
posted @ 2013-07-01 00:28 walkabc 阅读(313) 评论(0) 推荐(0) 编辑