]> Dogcows Code - chaz/yoink/blobdiff - src/Heroine.cc
library class revamped as manager, goodbye tilemap
[chaz/yoink] / src / Heroine.cc
index 2071a7bba6d4595a390d2c1c0f0635e3163cc5ce..a70b798e92071e6b34fd495f6b2c2219d6543b3b 100644 (file)
@@ -26,6 +26,8 @@
 
 *******************************************************************************/
 
+#include <Moof/Sound.hh>
+
 #include "Heroine.hh"
 #include "Log.hh"
 
@@ -34,9 +36,25 @@ Heroine::Heroine() :
        Character("Heroine") {}
 
 
+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)
 {
-       Mf::Scalar force = 4000.0;
+       Mf::Scalar force = 40.0;
        
        switch (event.type)
        {
This page took 0.019344 seconds and 4 git commands to generate.