protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            if (ControllerGame.CheckLastPage(typeof(Map), this))
            {
                Player         = e.Parameter as Character;
                Person1.Source = Player.IdleRight;
                MobAndChar.Add(Player);

                ControllerGame.RefreshItems(Player, qt_lifePot, qt_manaPot, ListInvetoryImage);
            }

            if (ControllerGame.CheckLastPage(typeof(BattleScreen), this))
            {
                MobAndChar = e.Parameter as List <Object>;
                Player     = MobAndChar.ElementAt(0) as Character;
                ControllerGame.RefreshItems(Player, qt_lifePot, qt_manaPot, ListInvetoryImage);
                Player.UpLevel += Player_UpLevel;

                if (MobAndChar.ElementAt(1) is Ninja)
                {
                    Ninja = MobAndChar.ElementAt(1) as Ninja;
                }
                else if (MobAndChar.ElementAt(1) is PablloVittar)
                {
                    PablloVittar = MobAndChar.ElementAt(1) as PablloVittar;
                }
                MobAndChar.RemoveAt(MobAndChar.Count - 1);
                //ControllerGame.PlaySoundsVitorHugo("CaioInimigosAFrente.mp4");
            }
            IsAnotherPage = false;
        }
예제 #2
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     if (ControllerGame.CheckLastPage(typeof(BattleScreen), this))
     {
         Player        = e.Parameter as Character;
         img_dy.Source = Player.Dying;
     }
 }
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            if (ControllerGame.CheckLastPage(typeof(SelecClass), this))
            {
                Player         = e.Parameter as Character;
                Person1.Source = Player.IdleRight;
                MobAndChar.Clear();
                Ninja2 = Creator.CreateMob("Ninja");//new Ninja();
                Ninja  = Creator.CreateMob("Ninja");;
                MobAndChar.Add(Player);
            }

            if (ControllerGame.CheckLastPage(typeof(BattleScreen), this))
            {
                MobAndChar = e.Parameter as List <Object>;

                Player = MobAndChar.ElementAt(0) as Character;

                Player.UpLevel += Player_UpLevel;

                if (MobAndChar.ElementAt(1) is Ninja)
                {
                    Ninja = MobAndChar.ElementAt(1) as Ninja;
                }
                else if (MobAndChar.ElementAt(1) is Ninja)
                {
                    Ninja2 = MobAndChar.ElementAt(1) as Ninja;
                }
                MobAndChar.RemoveAt(MobAndChar.Count - 1);
                SoundController.PlaySound(VoiceSound, "CaioInimigosAFrente.mp4");
            }

            if (ControllerGame.CheckLastPage(typeof(Map2), this))
            {
                Player         = e.Parameter as Character;
                Person1.Source = Player.IdleRight;
                MobAndChar.Clear();
                MobAndChar.Add(Player);
            }

            ControllerGame.RefreshItems(Player, qt_lifePot, qt_manaPot, ListInvetoryImage);
            IsAnotherPage = false;
        }
예제 #4
0
        private async void DisplayEndedBattleDialog()
        {
            Debug.WriteLine("DEBUG AQUIIIII");
            ContentDialog BattleEnded = new ContentDialog
            {
                Title           = "FIM DA BATALHA",
                Content         = "Você venceu!!!",
                CloseButtonText = "Voltar ao mapa"
            };

            ContentDialogResult result = await BattleEnded.ShowAsync();

            UnsignPageEvents();

            if (ControllerGame.CheckLastPage(typeof(Map2), this))
            {
                this.Frame.Navigate(typeof(Map2), CharList);
            }
            else if (ControllerGame.CheckLastPage(typeof(Map), this))
            {
                this.Frame.Navigate(typeof(Map), CharList);
            }
        }
예제 #5
0
        //Evento para sair da página e voltar ao mapa
        private void LeaveBtn_Tapped(object sender, TappedRoutedEventArgs e)
        {
            if (CharList.Count == 0)
            {
                CharList.Add(BattlePlayer);
                CharList.Add(Mob_);
            }
            else
            {
                CharList.Clear();
                CharList.Add(BattlePlayer);
                CharList.Add(Mob_);
            }

            UnsignPageEvents();
            if (ControllerGame.CheckLastPage(typeof(Map2), this))
            {
                this.Frame.Navigate(typeof(Map2), CharList);
            }
            else if (ControllerGame.CheckLastPage(typeof(Map), this))
            {
                this.Frame.Navigate(typeof(Map), CharList);
            }
        }
예제 #6
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            if (ControllerGame.CheckLastPage(typeof(Map), this))
            {
                CharList = e.Parameter as List <Object>;

                BattlePlayer = CharList.ElementAt(0) as Character;
                Mob_         = CharList.ElementAt(1) as Mob;
                CharList.Clear();

                Debug.WriteLine("DANO MOB: " + Mob_.Damage);
                Debug.WriteLine("Dano Player " + BattlePlayer.Damage);
                Debug.WriteLine("EU SOU " + Mob_.name);

                AdjustProgessBar();

                Person1.Source = BattlePlayer.IdleUp;
            }

            if (ControllerGame.CheckLastPage(typeof(Map2), this))
            {
                CharList = e.Parameter as List <Object>;

                BattlePlayer = CharList.ElementAt(0) as Character;
                Mob_         = CharList.ElementAt(1) as Mob;
                CharList.Clear();

                Debug.WriteLine("DANO MOB: " + Mob_.Damage);
                Debug.WriteLine("Dano Player " + BattlePlayer.Damage);
                Debug.WriteLine("EU SOU " + Mob_.name);

                AdjustProgessBar();

                Person1.Source = BattlePlayer.IdleUp;
            }

            if (BattlePlayer is Berserker)
            {
                btnSkillBasic.Content = "Basic Attack";
                btnSkillOne.Content   = "Corrupted Strike";
                btnSkillTwo.Content   = "Double Edged Sword";
            }
            if (BattlePlayer is Dicer)
            {
                btnSkillBasic.Content = "Waterball";
                btnSkillOne.Content   = "Mystic Snake";
                btnSkillTwo.Content   = "Nether Blast";
            }

            btnLifePot.IsEnabled = false;
            if (BattlePlayer.inventory.checkPotCount("LifePot"))
            {
                btnLifePot.IsEnabled = true;
            }

            BtnManaPot.IsEnabled = false;
            if (BattlePlayer.inventory.checkPotCount("ManaPot"))
            {
                BtnManaPot.IsEnabled = true;
            }

            Mob1.Source = Mob_.GifBattle;
            SignPageEvents();
            turn = BattleController.InicializeBattle(BattlePlayer, Mob_, button);
        }