This commit is contained in:
h4570
2020-12-07 22:11:21 +01:00
parent 6d9b93998a
commit 5787b6a920
6 changed files with 32 additions and 23 deletions
+4 -1
View File
@@ -21,9 +21,10 @@
// Constructors/Destructors
// ----
Player::Player(Audio *t_audio)
Player::Player(Audio *t_audio, TextureRepository *t_texRepo)
{
PRINT_LOG("Creating player object");
texRepo = t_texRepo;
audio = t_audio;
gravity = 0.1F;
lift = -1.0F;
@@ -45,6 +46,8 @@ Player::Player(Audio *t_audio)
mesh.setAnimSpeed(0.17F);
mesh.playAnimation(0, 0);
texRepo->addByMesh("meshes/player/", mesh, BMP);
walkAdpcm = audio->loadADPCM("sounds/walk.adpcm");
jumpAdpcm = audio->loadADPCM("sounds/jump.adpcm");
boomAdpcm = audio->loadADPCM("sounds/boom.adpcm");