HealthSystemTest has been created. This runs a single test simple test with HealthEvents and HealthSystem. Also some minor changes

This commit is contained in:
verysecrethero
2016-01-07 14:29:04 +01:00
parent 638c236ceb
commit a1ed79dfbf
8 changed files with 173 additions and 33 deletions
+1 -20
View File
@@ -60,26 +60,7 @@ Game::Game(int argc, char* argv[])
m_SystemPipeline->AddSystem<TriggerSystem>();
m_SystemPipeline->AddSystem<HealthSystem>();
//TEMP TEST DEL LATER
//skapar entityn som har komponenterna transf,model,player,health i sig. dvs är en spelare
EntityID playerID = m_World->CreateEntity();
ComponentWrapper transform = m_World->AttachComponent(playerID, "Transform");
ComponentWrapper model = m_World->AttachComponent(playerID, "Model");
model["Resource"] = "Models/Core/UnitSphere.obj";
ComponentWrapper player = m_World->AttachComponent(playerID, "Player");
ComponentWrapper health = m_World->AttachComponent(playerID, "Health");
Events::PlayerDamage e;
e.DamageAmount = 50.0f;
e.PlayerDamagedID = 9;
m_EventBroker->Publish(e);
Events::PlayerHealthPickup e2;
e2.HealthAmount = 40.0f;
e2.playerHealedID = 9;
m_EventBroker->Publish(e2);
//END TEST
// Invoke network
// Invoke network
if (m_Config->Get<bool>("Networking.StartNetwork", false)) {
//boost::thread workerThread(&Game::networkFunction, this);
networkFunction();