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...
-
本身常用範例 auto pFrame= SpriteFrameCache::getInstance()->getSpriteFrameByName(test); m_IconBox->setSpriteFrame(pFrame); http://cocos2...
-
http://blog.csdn.net/teng_ontheway/article/details/26078869 遊戲中經常會用到一些變換: 遊戲中武器和角色在一個layer上,為了效率,會考慮將bullet, effect和 PhysicsParticle分別放...
-
如何將IPA 透過ITUNES 安裝到 手機中 1.插上iPhone,開啟 iTunes,點選選單 檢視->媒體種類->APP 。iTunes 會切換至APP頁面 2.開啟檔案總管 將 .ipa 檔案 利用滑鼠拉進 iTunes。然後...
沒有留言:
張貼留言