diff --git a/SeasonsOfLoneliness.cpp b/SeasonsOfLoneliness.cpp index f38cb50..057d723 100644 --- a/SeasonsOfLoneliness.cpp +++ b/SeasonsOfLoneliness.cpp @@ -27,6 +27,8 @@ public: int textInd=0; int cursorX=0; int transitionTime=0; + bool fade=false; + int transparency=0; int frameCount=0; float elapsedTime=0; const float TARGET_RATE = 1/60.0; @@ -40,6 +42,10 @@ public: return true; } + bool GetAnyKey() { + cout << "Something has changed."; + } + bool OnUserUpdate(float fElapsedTime) override { elapsedTime+=fElapsedTime; @@ -48,9 +54,6 @@ public: updateGame(); } - if (GetKey(olc::A).bPressed) { - } - drawGame(); // called once per frame return true; @@ -58,6 +61,12 @@ public: void updateGame(){ frameCount++; + if (fade&&transparency>0) { + transparency--; + } else + if (!fade&&transparency<255) { + transparency++; + } switch (GAME_STATE) { case CUTSCENE_1:{ if (textInd