Cocos2d CCDrawNode填充颜色

时间:2016-06-21 10:46:23

标签: cocos2d-iphone

我正在使用cocos2d来ccdrawnode.DrawLineList方法来创建diamong形状。我使用以下代码

   `var diamond = new CCDrawNode();
        diamond.DrawLineList(new CCV3F_C4B[] {
            new CCV3F_C4B(new CCPoint(0,height/2), fillColor),
            new CCV3F_C4B(new CCPoint(height/2,height), fillColor),
            new CCV3F_C4B(new CCPoint(height/2,height), fillColor),
            new CCV3F_C4B(new CCPoint(height,height/2), fillColor),
            new CCV3F_C4B(new CCPoint(height,height/2), fillColor),
            new CCV3F_C4B(new CCPoint(height/2,0), fillColor),
            new CCV3F_C4B(new CCPoint(height/2,0), fillColor),
            new CCV3F_C4B(new CCPoint(0,height/2), fillColor)
        });`

钻石被绘制但钻石没有填充颜色,只有边框是彩色的。如何用cocos2d中的特定颜色填充钻石形状

0 个答案:

没有答案