游戏《水果忍者》完整游戏源码,代码下载下来打开工程直接可以编译通过运行
可以生成安卓apk包,winows,ios环境下跨平台运行
100%完整代码,源码编译 无bug运行
刀光算法<ol>void CFControlLayer::drawLine(CCPoint startPoint,CCPoint endPoint)
{
int dx, dy, p, c1, c2, x, y, xinc, yinc, i;
dx = startPoint.x - endPoint.x;
dy = startPoint.y - endPoint.y;
xinc = getSingle(dx);
yinc = getSingle(dy);
dx = dx>0?dx:-dx;
dy = dy>0?dy:-dy;
x = startPoint.x;
y = startPoint.y;
ccPointSize(1);
//设置后面要进行绘制时所用的色彩
ccDrawColor4B(0,0,255,128);
if (dx >= dy)
{
p = (dy count() |