Exemplo n.º 1
0
 void draw_chip_count(sf::RenderWindow & win, level const & lvl)
 {
     auto & res = resource_manager::get();
     auto & inv = lvl.chip.get<inventory>();
     
     unsigned req_chips = lvl.chip_count() 
                        - inv.count(entity_id::computer_chip);
     sf::Text txt(
         "Chips Left:\n       " + std::to_string(req_chips)
       , res[font_uid::arial]
       , 25
     );
     txt.setPosition((float)chip_count_xpos, (float)chip_count_ypos);
     txt.setColor(sf::Color::Red);
     win.draw(txt);
 }