public void KillAgent(Vector3Int cellPos, AgentController bomber = null) { nDeads++; foreach (AgentController agent in agents) { if (agent.position == cellPos && agent.gameObject.activeSelf) { agent.AddReward(-timer / matchTime); if (bomber != null && agent.id != bomber.id) // Morreu pq alguem matou ele { nKillsPerAgent[bomber.id]++; bomber.AddReward(0.2f); agent.AddReward(-0.8f); } else { // Morreu pelo mapa if (bomber == null) { agent.AddReward(-0.8f); } else // Se matou { agent.AddReward(-1); } } agent.gameObject.SetActive(false); } } if (nDeads >= nAgentsInGame) { ResetEnviroment(); } }