Exemplo n.º 1
0
void Game::init() {
    if (SDL_Init(SDL_INIT_EVERYTHING) != 0){
        std::cout << "SDL_Init Error: " << SDL_GetError() << std::endl;
    }

    systemList = SystemFactory().createSystems();


    graphics = Graphics();
    graphics.clearRenderer();
    isRunning = true;

    TextureManager *manager = new TextureManager(graphics);
    manager->loadTextureWithName("guy.png");
    world.manager.setTextureManager(manager);

    EntityFactory factory;
    Entity guy = factory.createGuy(world);
    Position p;
    p.x = 600;
    p.y = 20;
    ColorMod c;
    c.r = 10;
    c.g = 170;
    c.b = 40;
    
    Entity *z = factory.createZombie(world, p, c);

}