0
테두리를 그리기 위해 CCLayerColor의 그리기 방법을 재정의하고 있지만 색상은 변경되지 않습니다. 나는 ccDrawXxxx를 시도하고 모두 흰색으로 만 색상을 사용합니다. 나는 또한 같은 효과를 가지고 glColor4ub
을 시도했다. 이것은 내 끌기 방법에있는 것입니다 :Drawing with cocos2d
CGSize selfSize = [self contentSize];
float selfHeight = selfSize.height;
float selfWidth = selfSize.width;
CGPoint vertices[4] = {ccp(0.f, 0.f), ccp(0.f, selfHeight), ccp(selfWidth, selfHeight), ccp(selfWidth, 0.f)};
glColor4f(0, 0, 1.0f, 1.0f);
glLineWidth(4.0f);
ccDrawPoly(vertices, 4, YES);
내가 뭔가를 잃어버렸나요? 나는 v2.0을 사용하고있다.
'ccDrawColor (1, 0, 0, 1)'이 내가 필요한 것이었고 팁을 주셔서 감사합니다. – Echilon