What is this I don't even *falls asleep*
This commit is contained in:
+19
-1
@@ -6,6 +6,8 @@
|
||||
#include "GUI/Viewport.h"
|
||||
#include "GUI/TextureFrame.h"
|
||||
|
||||
#include "Events/Damage.h"
|
||||
|
||||
#include "GameWorld.h"
|
||||
|
||||
namespace GUI
|
||||
@@ -17,6 +19,8 @@ public:
|
||||
GameFrame(Frame* parent, std::string name)
|
||||
: Frame(parent, name)
|
||||
{
|
||||
EVENT_SUBSCRIBE_MEMBER(m_EDamage, &GameFrame::OnDamage);
|
||||
|
||||
m_World = std::make_shared<GameWorld>(EventBroker, ResourceManager);
|
||||
auto worldFrame = new WorldFrame(this, "GameWorldFrame", m_World);
|
||||
{
|
||||
@@ -27,16 +31,30 @@ public:
|
||||
vp2->X = vp1->Right();
|
||||
vp2->Width = 640;
|
||||
|
||||
auto tex = new TextureFrame(vp1, "TextureFrameThingy");
|
||||
tex = new TextureFrame(vp1, "TextureFrameThingy");
|
||||
tex->SetTexture("Textures/GUI/hurt.png");
|
||||
}
|
||||
m_World->Initialize();
|
||||
}
|
||||
|
||||
void Update(double dt)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool OnDamage(const Events::Damage &event)
|
||||
{
|
||||
//tex->SetTexture("Textures/GUI/hurt.png");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
EventRelay<Frame, Events::Damage> m_EDamage;
|
||||
std::shared_ptr<GameWorld> m_World;
|
||||
Viewport* vp1;
|
||||
Viewport* vp2;
|
||||
TextureFrame* tex;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user