private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(this); } }
//este es un singleton que se encarga de proveer variables a todo script que las necesite acceder. private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(this); } yaGiro = false; instanciador = GetComponent <Instanciador>(); }
public IHttpActionResult ObterApostas(string modeloAposta) { if (string.IsNullOrWhiteSpace(modeloAposta)) { return(NotFound()); } try { ModeloAposta tipoAposta = Instanciador.GerarIntancia(modeloAposta); List <Aposta> apostas = tipoAposta.ObterApostas(); return(Ok(apostas)); }catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult Apostar([FromBody] int[] numero, string modeloAposta) { if (string.IsNullOrWhiteSpace(modeloAposta)) { return(NotFound()); } try { ModeloAposta tipoAposta = Instanciador.GerarIntancia(modeloAposta); Aposta aposta = tipoAposta.Registrar(numero); return(Ok(aposta)); } catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult GerarNumero(string modeloAposta) { if (string.IsNullOrWhiteSpace(modeloAposta)) { return(NotFound()); } try { ModeloAposta tipoAposta = Instanciador.GerarIntancia(modeloAposta); List <int> numero = tipoAposta.GerarNumero(); return(Ok(numero)); } catch (Exception ex) { return(InternalServerError(ex)); } }
internal virtual Lfx.Types.OperationResult ConvertirEn(string tipoComprob) { Lbl.Comprobantes.ComprobanteConArticulos Comprob = this.Elemento as Lbl.Comprobantes.ComprobanteConArticulos; if (Comprob.Existe) { Lbl.Comprobantes.Tipo NuevoTipo = Lbl.Comprobantes.Tipo.TodosPorLetra[tipoComprob]; Lbl.Comprobantes.ComprobanteConArticulos Nuevo = Comprob.Convertir(NuevoTipo) as Lbl.Comprobantes.ComprobanteConArticulos; FormularioEdicion NuevoComprob = Instanciador.InstanciarFormularioEdicion(Nuevo); NuevoComprob.ControlDestino = EntradaComprobanteId; NuevoComprob.MdiParent = this.ParentForm.MdiParent; NuevoComprob.Show(); return(new Lfx.Types.SuccessOperationResult()); } else { return(new Lfx.Types.FailureOperationResult("Debe guardar el comprobante antes de poder convertirlo.")); } }
// Use this for initialization void Start() { Instanciador lo_instantiator = gameObject.AddComponent <Instanciador>(); lo_instantiator.InstanciarObjeto(mo_prefab); }
void Start() { CatchColor = GameObject.Find("GameObject").GetComponent<Instanciador>(); }
// Start is called before the first frame update void Start() { this.rb = GetComponent <Rigidbody>(); this.manager = GameObject.FindObjectOfType <Instanciador>(); this.audio = GetComponent <AudioSource>(); }
void Awake() { banqueta = GetComponent <ControleDeBancos>(); inst = GetComponent <Instanciador>(); }
// Start is called before the first frame update void Start() { instanciador = GameObject.Find("Instanciador").GetComponent <Instanciador>(); }