private void Awake() { narrador = GameObject.FindGameObjectWithTag("DungeonMaster").GetComponent <Narrador>(); lizaro = GameObject.FindGameObjectWithTag("Player").GetComponent <Lizaro>(); casaAbandonada = GameObject.FindGameObjectWithTag("Map").GetComponent <CasaAbandonada>(); txt = GameObject.FindGameObjectWithTag("DungeonMaster").GetComponent <Txt_NinhoAranha>(); }
private void Awake() { narrador = GameObject.FindGameObjectWithTag("DungeonMaster").GetComponent <Narrador>(); lizaro = GameObject.FindGameObjectWithTag("Player").GetComponent <Lizaro>(); txt = GameObject.FindGameObjectWithTag("DungeonMaster").GetComponent <Txt_BaseAvancada>(); cidadeElfosInimigos = GameObject.FindGameObjectWithTag("Map").GetComponent <CidadeElfosInimigos>(); }
private void Awake() { narrador = GameObject.FindGameObjectWithTag("DungeonMaster").GetComponent <Narrador>(); lizaro = GameObject.FindGameObjectWithTag("Player").GetComponent <Lizaro>(); txt = GameObject.FindGameObjectWithTag("DungeonMaster").GetComponent <Txt_Gruta>(); vilaVerdejante = GameObject.FindGameObjectWithTag("Map").GetComponent <VilaVerdejante>(); }
private void Awake() { narrador = GameObject.FindGameObjectWithTag("DungeonMaster").GetComponent <Narrador>(); intro = GameObject.FindGameObjectWithTag("DungeonMaster").GetComponent <Txt_Intro>(); lizaro = GameObject.FindGameObjectWithTag("Player").GetComponent <Lizaro>(); tenus = GameObject.FindGameObjectWithTag("Map").GetComponent <Tenus>(); }
public async Task <Response> Insert(Narrador narrador) { Response response = new Response(); if (string.IsNullOrWhiteSpace(narrador.Nome)) { response.Erros.Add("O nome do narrador deve ser informado."); } else if (narrador.Nome.Length < 2 || narrador.Nome.Length > 50) { response.Erros.Add("O nome do narrador deve conyter entre 2 e 50 caracteres."); } if (response.Erros.Count > 0) { response.Sucesso = false; return(response); } try { await _narradorRepository.Insert(narrador); response.Sucesso = true; return(response); } catch (Exception ex) { response.Erros.Add("Erro no banco de dados, contate o administrador."); response.Sucesso = false; File.WriteAllText("log.txt", ex.Message + " - " + ex.StackTrace); return(response); } }
private void Awake() { narrador = GameObject.FindGameObjectWithTag("DungeonMaster").GetComponent <Narrador>(); lizaro = GameObject.FindGameObjectWithTag("Player").GetComponent <Lizaro>(); txt = GameObject.FindGameObjectWithTag("DungeonMaster").GetComponent <Txt_CidadeElfosInimigos>(); campoAberto = GameObject.FindGameObjectWithTag("Map").GetComponent <CampoAberto>(); casaAbandonada = GameObject.FindGameObjectWithTag("Map").GetComponent <CasaAbandonada>(); ninhoAranha = GameObject.FindGameObjectWithTag("Map").GetComponent <NinhoAranha>(); }
public async Task <Response> Insert(Narrador narrador) { Response response = new Response(); try { this._context.Narradores.Add(narrador); await this._context.SaveChangesAsync(); response.Sucesso = true; } catch (Exception ex) { response.Erros.Add("Erro no banco de dados."); response.Sucesso = false; File.WriteAllText("log.txt", ex.Message + " - " + ex.StackTrace); } return(response); }
public async Task <IActionResult> Cadastrar(NarradorInsertViewModel viewModel) { var configuration = new MapperConfiguration(cfg => { cfg.CreateMap <NarradorInsertViewModel, Narrador>(); }); IMapper mapper = configuration.CreateMapper(); Narrador narrador = mapper.Map <Narrador>(viewModel); try { await this._narradorService.Insert(narrador); return(RedirectToAction("Index", "Competidor")); } catch (Exception ex) { ViewBag.Errors = ex.Message; } return(View()); }
private void Awake() { narrador = GameObject.FindGameObjectWithTag("DungeonMaster").GetComponent <Narrador>(); txt = GameObject.FindGameObjectWithTag("DungeonMaster").GetComponent <Txt_VilaVerdejante>(); }
public Task <Response> Delete(Narrador narrador) { throw new NotImplementedException(); }