]> Dogcows Code - chaz/yoink/blobdiff - src/Heroine.cc
simplified win32 installer build script
[chaz/yoink] / src / Heroine.cc
index e2b69b296198dc03e207b35b427c08ec6b29af1a..5df10319d282bb56fe293500359425ecda98ad76 100644 (file)
 
 *******************************************************************************/
 
+#include <Moof/Sound.hh>
+
 #include "Heroine.hh"
 #include "Log.hh"
 
        
 Heroine::Heroine() :
-       Character("Heroine") {}
+       Character("Effects") {}
+
+
+void Heroine::update(Mf::Scalar t, Mf::Scalar dt)
+{
+       Character::update(t, dt);
+
+       Mf::Vector3 at(0.0, 0.0, 0.0);
+       const Mf::Vector3 up(0.0, 1.0, 0.0);
+
+       if (mState.velocity[0] < 0.0) at[0] = -1.0;
+       else                          at[0] = 1.0;
+
+       Mf::Sound::setListenerPosition(Mf::promote(mState.position));
+       Mf::Sound::setListenerVelocity(Mf::promote(mState.velocity));
+       Mf::Sound::setListenerOrientation(at, up);
+}
 
 
 bool Heroine::handleEvent(const Mf::Event& event)
This page took 0.017079 seconds and 4 git commands to generate.