Exemplo n.º 1
0
        private async void Wznow_Btn_Click(object sender, RoutedEventArgs e)
        {
            var         local = ApplicationData.Current.LocalFolder;
            StorageFile file  = await local.GetFileAsync("SBXStaty");

            StorageFile file2 = await local.GetFileAsync("SBXEkwipunek");

            string str = await FileIO.ReadTextAsync(file);

            string str2 = await FileIO.ReadTextAsync(file2);

            string[] postacStaty = str.Split(",");
            string[] postacEQ    = str2.Split("\n");
            // string[] przedmiot = postacEQ[1].Split(' ');

            Bohater.CreateStaticInstance(postacStaty[0], postacStaty[1], int.Parse(postacStaty[2]), int.Parse(postacStaty[3]), int.Parse(postacStaty[4]), int.Parse(postacStaty[5]), int.Parse(postacStaty[6]), int.Parse(postacStaty[7]));
            Bohater.Instancja.Zloto = int.Parse(postacStaty[8]);

            /*  for(int i = 0; i < postacEQ.Length; i++)
             * {
             *    string[] przedmiot = postacEQ[i].Split(' ');
             *    Bohater.Instancja.Ekwipunek.Add(postacEQ[0], postacEQ[0], postacEQ[0], postacEQ[0], postacEQ[0]);
             *
             * }*/



            this.Frame.Navigate(typeof(Rozgrywka));
        }
Exemplo n.º 2
0
 private void Zwiadowca_Click(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(NazwaPostaci_TB.Text))
     {
         string imie = NazwaPostaci_TB.Text;
         Bohater.CreateStaticInstance(imie, "ms-appx:///Assets///Postacie/Zwiadowca.png", 1, 100, 5, 5, 5, 5);
         otworzScanaRozgrywka();
     }
 }