Update of /cvsroot/epfl/tggame
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14848
Modified Files:
game.cc rocket.cc rocketlauncher.cc
Log Message:
Son a l'explosion contre un mur ou autre objet ;-)
J'ai aussi enleve les son de tonnerre et autre.
Maintenant, il reste:
- Le bruit de la rocket qui part
- Le bruit de la rocket qui explose
Donc -> Il faut charger une nouvelle archive Sound.tgz
Index: game.cc
===================================================================
RCS file: /cvsroot/epfl/tggame/game.cc,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** game.cc 19 Nov 2004 18:54:45 -0000 1.36
--- game.cc 20 Nov 2004 09:05:11 -0000 1.37
***************
*** 38,72 ****
SoundManager::pSoundManager = pSoundManager;
-
- /*
- On ajoute plus les sons ici. On utilise un fichier file.snd qui contient le nom des
- sons a ajouter. Il faut creer le fichier file.snd qui contient:
-
- fire 0 1
- thunder 0 1
- scared2 0 1
- step 1 1
- gun 1 1
-
- et placer le dans data/sounds
-
- */
-
- //On prend les coordonnees de la tete de mort avec la lumiere rose
- Vector3 soundtestpos = pWorld->GetPointLightPos(5);
-
- //On ajoute le son de feu a cette position
- pSoundManager->SetSoundProperties("fire",soundtestpos.x,soundtestpos.y,soundtestpos.z,0.0,0.0,0.0);
-
- //On ajoute le son thunder a la position 0,70,0
- pSoundManager->SetSoundProperties("thunder",0,70,0,0,0,0);
-
- //On baisse le volume de la musique d'ambiance
- pSoundManager->SetSoundVolume("Music",0.5);
-
- //On joue les sons
- pSoundManager->PlaySound("fire");
- pSoundManager->PlaySound("thunder");
- pSoundManager->PlaySound("Music");
}
--- 38,41 ----
Index: rocketlauncher.cc
===================================================================
RCS file: /cvsroot/epfl/tggame/rocketlauncher.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rocketlauncher.cc 19 Nov 2004 12:05:14 -0000 1.3
--- rocketlauncher.cc 20 Nov 2004 09:05:11 -0000 1.4
***************
*** 31,34 ****
cR.pNode->GetPhysicCallBack()->Collide(NULL, cR.EndPoint, cR.Normal);*/
! SoundManager::pSoundManager->PlaySound("gun");
}
--- 31,34 ----
cR.pNode->GetPhysicCallBack()->Collide(NULL, cR.EndPoint, cR.Normal);*/
! SoundManager::pSoundManager->PlaySound("fire");
}
Index: rocket.cc
===================================================================
RCS file: /cvsroot/epfl/tggame/rocket.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** rocket.cc 20 Nov 2004 08:41:37 -0000 1.5
--- rocket.cc 20 Nov 2004 09:05:11 -0000 1.6
***************
*** 25,29 ****
pModel->Attach("HEAD", pEmit);
! pModel->Attach("", SoundManager::pSoundManager->GetSoundNode("gun"));
//pPhysic->SetSpeed
--- 25,32 ----
pModel->Attach("HEAD", pEmit);
! if(SoundManager::pSoundManager->CheckSound("fire"))
! pModel->Attach("", SoundManager::pSoundManager->GetSoundNode("fire"));
! if(SoundManager::pSoundManager->CheckSound("bomb"))
! pModel->Attach("", SoundManager::pSoundManager->GetSoundNode("bomb"));
//pPhysic->SetSpeed
***************
*** 49,52 ****
--- 52,58 ----
if (other != NULL && other->GetPhysicCallBack() != NULL) //on a touche un objet
other->GetPhysicCallBack()->Collide(NULL, vPoint, vCollisionNormal);
+
+ SoundManager::pSoundManager->PlaySound("bomb");
+
delete this;
}
|