Ejemplo n.º 1
0
 public void DrawOptions(params string[] options)
 {
     for (var i = 0; i < options.Length; i++)
     {
         var entry = options[i];
         var btn   = btnFactory.Create();
         btn.GetComponentInChildren <Text>().text = entry;
         btn.ClickEvent += OnSelect;
         btns.Add(btn);
     }
     OnSelect(btns.First());
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            TransporteService transporteService = new TransporteService(TripulanteFactory.Create(),
                                                                        CarroFactory.Create(), LocalFactory.Create());

            Console.WriteLine("Iniciar o transporte? S / N ?");
            if (Console.ReadLine().ToUpper() == "S")
            {
                transporteService.IniciarTransporte();
                Console.ReadKey();
            }
            else
            {
                Console.WriteLine("Sair!");
            }
        }