#include <iostream>
#include <string>
+#include <vector>
#include <boost/shared_ptr.hpp>
-#include <Moof/Camera.hh>
-#include <Moof/Dispatcher.hh>
-#include <Moof/Interpolator.hh>
#include <Moof/Layer.hh>
#include <Moof/Math.hh>
#include <Moof/Sound.hh>
-#include "Character.hh"
-#include "Heroine.hh"
+#include <Moof/Line.hh>
+#include <Moof/Plane.hh>
+#include <Moof/Ray.hh>
+#include <Moof/Sphere.hh>
+#include <Moof/Timer.hh>
+
#include "Hud.hh"
-#include "Scene.hh"
+#include "GameState.hh"
class GameLayer;
class GameLayer : public Mf::Layer
{
public:
+
GameLayer();
static GameLayerP alloc()
return GameLayerP(new GameLayer);
}
- void pushed(Mf::Engine& engine);
+ void pushedOntoEngine();
+
void update(Mf::Scalar t, Mf::Scalar dt);
void draw(Mf::Scalar alpha) const;
bool handleEvent(const Mf::Event& event);
private:
+ void loadSceneLoader();
+ void advanceScene();
+
+ void thinkTimer();
+
void setProjection();
void setProjection(Mf::Scalar width, Mf::Scalar height);
+ GameState mState;
+ Mf::Timer mThinkTimer;
- Mf::Sound mMusic;
+ HudP mHud;
- HeroineP mHeroine;
- SceneP mScene;
+ Mf::SoundStream mMusic;
Mf::Sound mPunchSound;
- Mf::PolynomialInterpolator<5> mInterp;
+ Mf::Ray<2> mRay;
+ Mf::Line<2> mLine;
+ Mf::Sphere<2> mSphere;
- Mf::Camera mCamera;
-
- HudP mHud;
+ Mf::Timer mRayTimer;
+ void rayTimer();
};