X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FHud.hh;h=d3675a476c85b62dcb5782256dd2856bfce9f506;hp=59f0631a964dcf391de2aff2bdfbf45ffaf976a2;hb=6a5d12788f2778a26223de690d34b00ac16a6ec3;hpb=a31d65a998121df0651c57bfb68782e2a07d2e2f diff --git a/src/Hud.hh b/src/Hud.hh index 59f0631..d3675a4 100644 --- a/src/Hud.hh +++ b/src/Hud.hh @@ -39,6 +39,7 @@ #include #include +#include "GameLayer.hh" #include "Tilemap.hh" @@ -76,11 +77,11 @@ class Hud : public Mf::Layer { public: - Hud(); + Hud(GameLayer::State& state); - static HudP alloc() + static HudP alloc(GameLayer::State& 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: + GameLayer::State& mState; + ProgressBar mBar1; ProgressBar mBar2;