Creada la classe Resource
Afegida la musica i els sons a Resource
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
#include <algorithm> // for max
|
||||
#include "animated_sprite.h" // for SpriteAnimated
|
||||
#include "asset.h" // for Asset
|
||||
#include "jail_audio.h" // for JA_DeleteSound, JA_LoadSound, JA_PlaySound
|
||||
#include "jail_audio.h" // JA_PlaySound
|
||||
#include "param.h" // for param
|
||||
#include "resource.h" // for Resource
|
||||
#include "screen.h" // for Screen
|
||||
#include "smart_sprite.h" // for SpriteSmart
|
||||
#include "sprite.h" // for Sprite
|
||||
@@ -26,7 +27,6 @@ GameLogo::GameLogo(int x, int y)
|
||||
|
||||
arcade_edition_sprite_(std::make_unique<Sprite>(arcade_edition_texture_, (param.game.width - arcade_edition_texture_->getWidth()) / 2, param.title.arcade_edition_position, arcade_edition_texture_->getWidth(), arcade_edition_texture_->getHeight())),
|
||||
|
||||
crash_sound_(JA_LoadSound(Asset::get()->get("title.wav").c_str())),
|
||||
|
||||
x_(x),
|
||||
y_(y)
|
||||
@@ -35,12 +35,6 @@ GameLogo::GameLogo(int x, int y)
|
||||
init();
|
||||
}
|
||||
|
||||
// Destructor
|
||||
GameLogo::~GameLogo()
|
||||
{
|
||||
JA_DeleteSound(crash_sound_);
|
||||
}
|
||||
|
||||
// Inicializa las variables
|
||||
void GameLogo::init()
|
||||
{
|
||||
@@ -137,7 +131,7 @@ void GameLogo::update()
|
||||
status_ = Status::SHAKING;
|
||||
|
||||
// Reproduce el efecto sonoro
|
||||
JA_PlaySound(crash_sound_);
|
||||
JA_PlaySound(Resource::get()->getSound("title.wav"));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user