Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
最後の質問であるthisの続きで、CCRibbon を置き換えるために、単純な線を描きたいと思います。これはどのように行うことができますか?(ちなみに他の過去の質問も見ましたが、まだわかりません)
ありがとう。
cocos2d プロジェクトの Draw Primitives テストを見てください。要するに、次のコードを使用できます。
ノードの draw メソッド内
-(void)draw { [super draw]; ccDrawColor4B(255, 255, 255, 255) //Color of the line RGBA glLineWidth(5.0f) //Stroke width of the line ccDrawLine(ccp(0, 0), ccp(10, 10)); }