/*] Copyright (c) 2009-2010, Charles McGarvey [************************** **] All rights reserved. * * vi:ts=4 sw=4 tw=75 * * Distributable under the terms and conditions of the 2-clause BSD license; * see the file COPYING for a complete text of the license. * **************************************************************************/ #ifndef _GAMELAYER_HH_ #define _GAMELAYER_HH_ /** * @file GameLayer.hh * This is the big enchilada. */ #include #include #include #include #include #include #include // TODO #include #include #include #include #include #include "GameState.hh" #include "Hud.hh" class GameLayer; typedef boost::shared_ptr GameLayerP; class GameLayer : public moof::view { public: static GameLayerP alloc() { return GameLayerP(new GameLayer); } GameLayer(); void did_add_to_view(); void update(moof::scalar t, moof::scalar dt); void draw(moof::scalar alpha) const; bool handle_event(const moof::event& event); private: void loadSceneLoader(); void advanceScene(moof::settings& settings); void thinkTimer(); void projection(); void projection(moof::scalar width, moof::scalar height); GameState state_; moof::timer mThinkTimer; HudP mHud; //moof::sound_stream mMusic; //moof::sound mPunchSound; moof::sound_stream_handle music_; moof::ray2 mRay; moof::line2 mLine; moof::circle mCircle; moof::timer mRayTimer; void rayTimer(); }; #endif // _GAMELAYER_HH_