Changeset 1e3dddf in opengl-game


Ignore:
Timestamp:
Oct 24, 2018, 2:39:08 AM (6 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
3d96d13
Parents:
25b47d7
Message:

Display an actual score, which gets incremented every time the player destroys an asteroid.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TODO.txt

    r25b47d7 r1e3dddf  
    1 DEBUGGING
    2 ==========
    3 -Read the sections about shader debugging, starting from line 59
    4 
    51TODO
    62==========
  • new-game.cpp

    r25b47d7 r1e3dddf  
    215215
    216216double fps;
     217unsigned int score = 0;
    217218
    218219vec3 cam_pos;
     
    806807               if (((Asteroid*)objects[i])->hp <= 0) {
    807808                  removeObjectFromScene(*objects[i], ubo);
     809                  score++;
    808810               }
    809811            }
     
    22842286   */
    22852287
    2286    stringstream ss;
    2287    ss << "FPS:   " << fps;
     2288   stringstream ssScore, ssFps;
     2289   ssScore << "Score: " << score;
     2290   ssFps << "FPS:   " << fps;
    22882291
    22892292   {
     
    22942297         ImGuiWindowFlags_NoResize |
    22952298         ImGuiWindowFlags_NoMove);
    2296       ImGui::Text("Score: ???");
    2297       ImGui::Text(ss.str().c_str());
     2299      ImGui::Text(ssScore.str().c_str());
     2300      ImGui::Text(ssFps.str().c_str());
    22982301      ImGui::End();
    22992302   }
Note: See TracChangeset for help on using the changeset viewer.