0

Ok. Either I'm missing something really obvious, or I'm not understand what a control point is. Here's a function I call to create an array made of several points. I'll use these points later to place sprites on a grid.

void gMode::createGrid(){
    _grid = new CCPointArray;
    for (int y=1; y<=25; y++) {
        for (int x = 2; x<=29; x++){
            CCPoint point = CCPointMake(x, y);
        _grid->addControlPoint(point);
        }
    }
}

1 Answer 1

0

Firstly You need to create the CCPointArray ....say CCPointArray::create(100) and then perform whatever you want to ...tell me the results

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.