Example #1
0
        private void LoadGame(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
            dlg.DefaultExt = ".bin";                        // Default file extension
            dlg.Filter     = "Text documents (.bin)|*.bin"; // Filter files by extension
            Nullable <bool> result = dlg.ShowDialog();

            if (result == true)
            {
                GamePage gamePage = new GamePage(frameRef, null); // create a new GamePage
                frameRef.ParentFrame.Navigate(gamePage);          // switch priority from MenuPage to GamePage
                gamePage.LoadGame(dlg.FileName);
            }
        }
Example #2
0
 public BattleScene(GamePage page, Player player, Monster monster)
 {
     parentPage        = page;
     this.player       = player;
     this.monster      = monster;
     this.playerImage  = player.GetImage();
     this.monsterImage = monster.GetImage();
     if (monster.Name == "monster0581") // mimic
     {
         Image img = new Image();
         img.Source        = new System.Windows.Media.Imaging.BitmapImage(new Uri(("Assets/" + "monster0581b" + ".png"), UriKind.Relative));
         img.Name          = "monster0581b";
         this.monsterImage = img;
     }
 }
Example #3
0
 public ImageInteractionScene(ImageInteraction inter, GamePage parent)
 {
     interaction = inter;
     parentPage  = parent;
 }
Example #4
0
 public ListBoxInteractionDisplay(GamePage page)
 {
     parentPage = page;
 }
Example #5
0
 public ImageInteractionScene(GamePage parent, Image img)
 {
     imgSetup   = img;
     parentPage = parent;
 }
Example #6
0
 public PageData(GamePage parent)
 {
     this.parent        = parent;
     items              = new List <Item>();
     itemImagePositions = new List <int>();
 }
Example #7
0
        public void StartGameRun(string data)
        {
            GamePage gamePage = new GamePage(frameRef, data);

            frameRef.ParentFrame.Navigate(gamePage);
        }