在你的类中重写draw()void XXXX::draw(){ ccDrawColor4B(0, 255, 0, 255); //设置颜色绿色 ccDrawLine(ccp(0,0),ccp(100,100)); //从00点画到100,100}