X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FHud.hh;h=016767a5a8ba48ee97bff20743c16645c3eab692;hp=59f0631a964dcf391de2aff2bdfbf45ffaf976a2;hb=a295f8def17036c8071b56e181364f99a377cae7;hpb=a31d65a998121df0651c57bfb68782e2a07d2e2f diff --git a/src/Hud.hh b/src/Hud.hh index 59f0631..016767a 100644 --- a/src/Hud.hh +++ b/src/Hud.hh @@ -39,6 +39,7 @@ #include #include +#include "GameState.hh" #include "Tilemap.hh" @@ -76,11 +77,11 @@ class Hud : public Mf::Layer { public: - Hud(); + Hud(GameState& state); - static HudP alloc() + static HudP alloc(GameState& state) { - return HudP(new Hud); + return HudP(new Hud(state)); } void setBar1Progress(Mf::Scalar progress) @@ -99,11 +100,14 @@ public: void resize(int width, int height); - void draw(Mf::Scalar alpha = 0.0) const; - bool handleEvent(Mf::Event& event); + void update(Mf::Engine& engine, Mf::Scalar t, Mf::Scalar dt); + void draw(Mf::Engine& engine, Mf::Scalar alpha = 0.0) const; + bool handleEvent(Mf::Engine& engine, const Mf::Event& event); private: + GameState& mState; + ProgressBar mBar1; ProgressBar mBar2;