public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     if (GUILayout.Button("Barajar"))
     {
         Baraja b = (Baraja)target;
         b.Barajar();
     }
     if (GUILayout.Button("A String"))
     {
         Baraja b = (Baraja)target;
         b.ConvertirATexto();
     }
     if (GUILayout.Button("Desde String"))
     {
         Baraja b = (Baraja)target;
         b.ConvertirDesdeTexto();
     }
     if (GUILayout.Button("Descomprimir"))
     {
         Baraja b = (Baraja)target;
         b.Descomprimir();
     }
     if (GUILayout.Button("Comprimir"))
     {
         Baraja b = (Baraja)target;
         b.Comprimir();
     }
 }
Exemple #2
0
 private void Start()
 {
     baraja.CargarCartas();
     baraja.Barajar();
     for (int i = 0; i < 4; i++)
     {
         Jalar();
     }
     ControlUICartas.singleton.delegadoJaladas += SubJalar;
 }
Exemple #3
0
        public IActionResult Index()
        {
            Baraja baraja1 = new Baraja();

            baraja1.Barajar();

            //Chapuza?
            //string[] arrayDeCartas = new string[40];
            //for (int i = 0; i < baraja1.cartas.Length; i++)
            //{
            //    arrayDeCartas[i] = baraja1.cartas[i].palo.ToString() + "-" + baraja1.cartas[i].numero.ToString();
            //}

            ViewData["baraja"] = baraja1.cartas;
            return(View());
        }