Exemplo n.º 1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
Exemplo n.º 2
0
    //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>();
    }
Exemplo n.º 3
0
        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));
            }
        }
Exemplo n.º 4
0
        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));
            }
        }
Exemplo n.º 5
0
        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));
            }
        }
Exemplo n.º 6
0
        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."));
            }
        }
Exemplo n.º 7
0
    // Use this for initialization
    void Start()
    {
        Instanciador lo_instantiator = gameObject.AddComponent <Instanciador>();

        lo_instantiator.InstanciarObjeto(mo_prefab);
    }
Exemplo n.º 8
0
 void Start()
 {
     CatchColor = GameObject.Find("GameObject").GetComponent<Instanciador>();
 }
Exemplo n.º 9
0
 // Start is called before the first frame update
 void Start()
 {
     this.rb      = GetComponent <Rigidbody>();
     this.manager = GameObject.FindObjectOfType <Instanciador>();
     this.audio   = GetComponent <AudioSource>();
 }
Exemplo n.º 10
0
 void Awake()
 {
     banqueta = GetComponent <ControleDeBancos>();
     inst     = GetComponent <Instanciador>();
 }
Exemplo n.º 11
0
 // Start is called before the first frame update
 void Start()
 {
     instanciador = GameObject.Find("Instanciador").GetComponent <Instanciador>();
 }