X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FHeroine.cc;h=5df10319d282bb56fe293500359425ecda98ad76;hp=2071a7bba6d4595a390d2c1c0f0635e3163cc5ce;hb=b357615aba1dbde81e3c6999366604e6001010a7;hpb=a31d65a998121df0651c57bfb68782e2a07d2e2f diff --git a/src/Heroine.cc b/src/Heroine.cc index 2071a7b..5df1031 100644 --- a/src/Heroine.cc +++ b/src/Heroine.cc @@ -26,17 +26,35 @@ *******************************************************************************/ +#include + #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) { - Mf::Scalar force = 4000.0; + Mf::Scalar force = 40.0; switch (event.type) {