[Added] Tutorial Screen, Start of the Game Screen

This commit is contained in:
Ninjaws
2024-12-08 22:03:56 +01:00
parent 83d1d622ee
commit 76dd80d3a3
23 changed files with 396 additions and 65 deletions
+13 -1
View File
@@ -1,5 +1,4 @@
#include "AssetService.h"
#include <iostream>
AssetService::AssetService()
{
@@ -19,6 +18,13 @@ void AssetService::setAssets()
music[EMusic::MAIN] = loadMusic("Audio/Music/Crash_WarpRoomTheme.ogg", true);
music[EMusic::GAME] = loadMusic("Audio/Music/GameTheme_2.ogg", true);
music[EMusic::GAME_OVER] = loadMusic("Audio/Music/gameOverTheme.ogg", false);
/** Todo: set volume */
backgrounds[EBackground::TUTORIAL] = loadTexture("Textures/TutorialBackground2.png");
backgrounds[EBackground::GAME1] = loadTexture("Textures/GameBackground_1.png");
backgrounds[EBackground::GAME2] = loadTexture("Textures/GameBackground_2.jpg");
backgrounds[EBackground::GAME3] = loadTexture("Textures/GameBackground_3.png");
backgrounds[EBackground::VICTORY] = loadTexture("Textures/VictoryScreenBackground.png");
}
Font AssetService::getFont(EFont font, int fontSize)
@@ -29,6 +35,12 @@ Font AssetService::getFont(EFont font, int fontSize)
return fnt;
}
Texture2D AssetService::loadTexture(std::string filename)
{
Texture2D texture = LoadTexture((assetDir + filename).c_str());
return texture;
}
std::string AssetService::getFontUrl(EFont font)
{
return assetDir + fonts[font];