Merge remote-tracking branch 'origin/Networking'
# Conflicts: # src/Engine/Network/Client.cpp # src/Game/Systems/WeaponSystem.cpp
This commit is contained in:
@@ -12,7 +12,6 @@ HealthSystem::HealthSystem(World* m_World, EventBroker* eventBroker)
|
||||
void HealthSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& component, double dt)
|
||||
{
|
||||
//if entityID of health is 9 then the players ID is also 9 (player,health are connected to the same entity)
|
||||
ComponentWrapper player = m_World->GetComponent(component.EntityID, "Player");
|
||||
double maxHealth = (double)component["MaxHealth"];
|
||||
|
||||
//process the DeltaHealthVector and change the entitys health accordingly
|
||||
|
||||
@@ -46,6 +46,7 @@ bool WeaponSystem::OnInputCommand(const Events::InputCommand& e)
|
||||
|
||||
bool WeaponSystem::OnShoot(const Events::Shoot& eShoot) {
|
||||
// Screen center, based on current resolution!
|
||||
//TODO: check if player has enough ammo and if weapon has a cooldown or not
|
||||
Rectangle screenResolution = m_Renderer->Resolution();
|
||||
glm::vec2 centerScreen = glm::vec2(screenResolution.Width / 2, screenResolution.Height / 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user