Fixed merge conflicts. Scoreboard updates team when a team is picked. Fixed some code standard violations and misspellings.
This commit is contained in:
@@ -10,9 +10,9 @@ CapturePointSystem::CapturePointSystem(SystemParams params)
|
||||
EVENT_SUBSCRIBE_MEMBER(m_ETriggerTouch, &CapturePointSystem::OnTriggerTouch);
|
||||
EVENT_SUBSCRIBE_MEMBER(m_ETriggerLeave, &CapturePointSystem::OnTriggerLeave);
|
||||
EVENT_SUBSCRIBE_MEMBER(m_ECaptured, &CapturePointSystem::OnCaptured);
|
||||
EVENT_SUBSCRIBE_MEMBER(m_EReset, &CapturePointSystem::OnReset);
|
||||
Init();
|
||||
}
|
||||
EVENT_SUBSCRIBE_MEMBER(m_EReset, &CapturePointSystem::OnReset);
|
||||
Init();
|
||||
}
|
||||
|
||||
void CapturePointSystem::Init()
|
||||
|
||||
@@ -10,6 +10,7 @@ ScoreScreenSystem::ScoreScreenSystem(SystemParams params)
|
||||
EVENT_SUBSCRIBE_MEMBER(m_EPlayerConnected, &ScoreScreenSystem::OnPlayerConnected);
|
||||
EVENT_SUBSCRIBE_MEMBER(m_EPlayerDisconnected, &ScoreScreenSystem::OnPlayerDisconnected);
|
||||
EVENT_SUBSCRIBE_MEMBER(m_EReset, &ScoreScreenSystem::OnReset);
|
||||
EVENT_SUBSCRIBE_MEMBER(m_EInputCommand, &ScoreScreenSystem::OnInputCommand);
|
||||
}
|
||||
|
||||
void ScoreScreenSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& scoreScreen, double dt)
|
||||
@@ -168,3 +169,14 @@ bool ScoreScreenSystem::OnReset(const Events::Reset & e)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ScoreScreenSystem::OnInputCommand(const Events::InputCommand & e)
|
||||
{
|
||||
if (e.Command != "PickTeam" || e.PlayerID == -1 || e.Value == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
m_PlayerIdentities.at(e.PlayerID).Team = e.Value;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user