1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
| // // 一個點、多個點 // 正方形小點 void drawPoint( const Vec2& point, const float pointSize, const Color4F &color); void drawPoints( const Vec2 *position, unsigned int numberOfPoints, const Color4F &color); void drawPoints( const Vec2 *position, unsigned int numberOfPoints, const float pointSize, const Color4F &color); // 線 void drawLine( const Vec2 &origin, const Vec2 &destination, const Color4F &color); // 矩形、四邊形 // Solid表示實心 void drawRect( const Vec2 &origin, const Vec2 &destination, const Color4F &color); void drawRect( const Vec2 &p1, const Vec2 &p2, const Vec2 &p3, const Vec2& p4, const Color4F &color); void drawSolidRect( const Vec2 &origin, const Vec2 &destination, const Color4F &color); // 多邊形 // Solid表示實心 void drawPoly( const Vec2 *poli, unsigned int numberOfPoints, bool closePolygon, const Color4F &color); void drawSolidPoly( const Vec2 *poli, unsigned int numberOfPoints, const Color4F &color); // 橢圓 // Solid表示實心 void drawCircle( const Vec2 ¢er, float radius, float angle, unsigned int segments, bool drawLineToCenter, const Color4F &color); void drawCircle( const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY, const Color4F &color); void drawSolidCircle( const Vec2& center, float radius, float angle, unsigned int segments, const Color4F& color); void drawSolidCircle( const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY, const Color4F &color); // 樣條曲線 void drawCardinalSpline(PointArray *config, float tension, unsigned int segments, const Color4F &color); void drawCatmullRom(PointArray *points, unsigned int segments, const Color4F &color); |
2016年5月25日 星期三
0525 cocos2d-x 3.3 畫圖 新增函數
訂閱:
張貼留言 (Atom)
cocos2dx-lua 建立滑鼠監聽
重要關鍵字 EVENT_MOUSE_SCROLL addEventListenerWithSceneGraphPriority if IsPc() then --建立滑鼠監聽 local listener = cc.EventListenerMouse...
-
http://blog.csdn.net/teng_ontheway/article/details/26078869 遊戲中經常會用到一些變換: 遊戲中武器和角色在一個layer上,為了效率,會考慮將bullet, effect和 PhysicsParticle分別放...
-
AppDelegate::applicationDidFinishLaunching()函數里 把 glview = GLViewImpl::createWithRect("NAME", Rect(0, 0, designResolutionSize.widt...
-
https://cocosgamestory.wordpress.com/2015/08/12/%E6%9B%B4%E6%8F%9B%E6%96%B0%E7%9A%84appicon/ 使用心得: 透過網站 取得各種SIZE的ICON,在手動更換目錄下的ICON即可 (coco...
沒有留言:
張貼留言