Working damage dealing, a super cool reload effect and hit markers!

This commit is contained in:
2016-02-11 22:50:44 +01:00
parent 5e05e51309
commit d1213f9f59
22 changed files with 473 additions and 135 deletions
+9 -5
View File
@@ -41,7 +41,9 @@ void PlayerDeathSystem::createDeathEffect(EntityWrapper player)
playerEntityModel.Copy(deathEffectEW["Model"]);
playerEntityAnimation.Copy(deathEffectEW["Animation"]);
//freeze the animation
deathEffectEW["Animation"]["Speed"] = 0.0;
deathEffectEW["Animation"]["Speed1"] = 0.0;
deathEffectEW["Animation"]["Speed2"] = 0.0;
deathEffectEW["Animation"]["Speed3"] = 0.0;
//copy the models position,orientation
deathEffectEW["Transform"]["Position"] = (glm::vec3)player["Transform"]["Position"];
@@ -50,8 +52,10 @@ void PlayerDeathSystem::createDeathEffect(EntityWrapper player)
//deathEffectEW["ExplosionEffect"]["ExplosionOrigin"] = glm::vec3(0, 0, 0);
//camera (with lifetime) behind the player
auto cam = deathEffectEW.FirstChildByName("Camera");
Events::SetCamera eSetCamera;
eSetCamera.CameraEntity = cam;
m_EventBroker->Publish(eSetCamera);
if (player == LocalPlayer) {
auto cam = deathEffectEW.FirstChildByName("Camera");
Events::SetCamera eSetCamera;
eSetCamera.CameraEntity = cam;
m_EventBroker->Publish(eSetCamera);
}
}