[Added] Crates, Hud for bullets and health
This commit is contained in:
@@ -20,6 +20,13 @@ void AssetService::setAssets()
|
||||
music[EMusic::GAME_OVER] = loadMusic("Audio/Music/gameOverTheme_2.ogg", false);
|
||||
/** Todo: set volume */
|
||||
|
||||
sounds[ESound::SHOOT] = loadSound("Audio/Sounds/gunShot.wav");
|
||||
SetSoundVolume(sounds[ESound::SHOOT], 0.4f);
|
||||
sounds[ESound::NO_AMMO] = loadSound("Audio/Sounds/outOfAmmo.wav");
|
||||
sounds[ESound::CRATE_BREAK] = loadSound("Audio/Sounds/crateBreak.wav");
|
||||
SetSoundVolume(sounds[ESound::CRATE_BREAK], 1.0f);
|
||||
sounds[ESound::JELLY_FREED] = loadSound("Audio/Sounds/jellyFreed.wav");
|
||||
|
||||
backgrounds[EBackground::TUTORIAL] = loadTexture("Textures/TutorialBackground2.png");
|
||||
backgrounds[EBackground::GAME1] = loadTexture("Textures/GameBackground_1.png");
|
||||
backgrounds[EBackground::GAME2] = loadTexture("Textures/GameBackground_2.jpg");
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#include "services/StateService.h"
|
||||
#include "raylib.h"
|
||||
#include "services/StateService.h"
|
||||
#include "services/AudioService.h"
|
||||
#include "services/InputService.h"
|
||||
#include "screens/TitleScreen.h"
|
||||
#include "screens/MainScreen.h"
|
||||
#include "screens/TutorialScreen.h"
|
||||
#include "screens/GameScreen.h"
|
||||
#include "screens/GameOverScreen.h"
|
||||
#include <optional>
|
||||
#include "services/AudioService.h"
|
||||
#include "services/InputService.h"
|
||||
|
||||
void StateService::setScreen(EScreen state)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ void StateService::startGame()
|
||||
{
|
||||
// if(!instance)
|
||||
// return;
|
||||
// InitAudioDevice();
|
||||
InitAudioDevice();
|
||||
// InitWindow(640,544, "Jelly Rescue");
|
||||
InitWindow(screenSize.x, screenSize.y, "Jelly Rescue");
|
||||
SetTargetFPS(45);
|
||||
@@ -75,7 +75,7 @@ void StateService::startGame()
|
||||
#endif
|
||||
|
||||
CloseWindow();
|
||||
// CloseAudioDevice();
|
||||
CloseAudioDevice();
|
||||
}
|
||||
|
||||
void StateService::handleMusic()
|
||||
|
||||
Reference in New Issue
Block a user