void FlowContextController::linkForFirstLevel(void)
{
    startRoute(QPoint(0, 0));
    newRoutePoint(QPoint(2, 0));
    endRoute();

    startRoute(QPoint(0, 2));
    newRoutePoint(QPoint(2, 2));
    endRoute();
}
Exemple #2
0
// Constructor with destination
Car::Car(sf::Texture& texture, Tile* startPosition, Tile* destination) {
    mMaxSpeed = 0.12f;
    mBlocked = false;
    mFinished = true;
    mGreenlit = false;
    mCurrentIntersection = NULL;
    
    // Set texture
    mSprite.setTexture(texture);
    // Set position/rotation origin
    mSprite.setOrigin(5.0f, 5.0f);
    // Set start position
    setStartPosition(startPosition);
    // Calculate and start route
    calculateRoute(destination);
    startRoute();
}