public ActionResult SalvarInfectado([FromBody] infectedDTO dto) { var infectado = new infected(dto.DataNascimento, dto.Sexo, dto.Latitude, dto.Longitude); _infectadosCollection.InsertOne(infectado); return(StatusCode(201, "Infectado adicionado com sucesso")); }
void infect() { if (game_script.units >= price) { game_script.units -= price; GameObject new_infected = Instantiate(infected_prefab, this.gameObject.transform.parent.parent); new_infected.tag = this.gameObject.tag; infected infected_script = new_infected.GetComponent <infected>(); infected_script.lifetime = lifetime; infected_script.income = income; infected_script.start_counting(); } else { } }