Beispiel #1
0
bool HelloWorld::ccTouchBegan (CCTouch *pTouch, CCEvent *pEvent)
{
    Hexagon h = line.CCP2Hex (this->convertTouchToNodeSpace (pTouch));
    h.color = ccc4f (1, 0, 1, 1);
    h.Integerlize();
    line.hexagones.push_back (h);

    return true;
}
Beispiel #2
0
void HelloWorld::ccTouchMoved (CCTouch *pTouch, CCEvent *pEvent)
{
    line.hexagones.erase (line.hexagones.begin() + 1, line.hexagones.end());
    Hexagon h = field.CCP2Hex (this->convertTouchToNodeSpace (pTouch));
    h.Integerlize();
    line.MakeLine (line.hexagones[0], h, ccc4f (1, 0.5, 0.5, 1));
    intersection.hexagones.clear();
    intersection.MakeSolidHex (3, h, ccc4f (1, 1, 1, 1));
}