Created
July 28, 2020 10:46
-
-
Save Hsgngr/2f6d3b1a618fb421ba9c88ae5b66ae7a to your computer and use it in GitHub Desktop.
ChangeAgentStatus() of DummyBot.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void changeAgentStatus() | |
{ | |
switch (m_InfectionStatus) | |
{ | |
case agentStatus.HEALTHY: | |
GetComponentInChildren<Renderer>().material = healthyMaterial; | |
break; | |
case agentStatus.INFECTED: | |
GetComponentInChildren<Renderer>().material = infectiousMaterial; | |
pandemicAreaObj.GetComponent<PandemicArea>().healthyCounter--; | |
pandemicAreaObj.GetComponent<PandemicArea>().InfectedCounter++; | |
//Add - reward here. | |
break; | |
case agentStatus.RECOVERED: | |
GetComponentInChildren<Renderer>().material = recoveredMaterial; | |
pandemicAreaObj.GetComponent<PandemicArea>().InfectedCounter--; | |
pandemicAreaObj.GetComponent<PandemicArea>().RecoveredCounter++; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment