#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/Script.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;
void loadSceneLoader();
void advanceScene();
- Mf::Scalar getZCoord(const Mf::Vector2& position) const;
+ void thinkTimer();
void setProjection();
void setProjection(Mf::Scalar width, Mf::Scalar height);
+ GameState mState;
+ Mf::Timer mThinkTimer;
- // the script object must be mutable because some script functions must be
- // called during draw
- mutable Mf::Script mScript;
- std::vector<std::string> mSceneList;
+ HudP mHud;
- Mf::Sound mMusic;
+ Mf::SoundStream mMusic;
Mf::Sound mPunchSound;
- HeroineP mHeroine;
- SceneP mScene;
+ Mf::Ray<2> mRay;
+ Mf::Line<2> mLine;
+ Mf::Sphere<2> mSphere;
- Mf::PolynomialInterpolator<5> mInterp;
-
- Mf::Camera mCamera;
-
- HudP mHud;
+ Mf::Timer mRayTimer;
+ void rayTimer();
};