예제 #1
0
        public void CastSkill(int Button)
        {
            if (!ControllerGame.IsSkillHitting(CharacterSkill, Mob1))
            {
                Canvas.SetLeft(CharacterSkill, Canvas.GetLeft(CharacterSkill) + 45);
                AttackingAnimation(true);
            }


            else if (ControllerGame.IsSkillHitting(CharacterSkill, Mob1))
            {
                BattleController.CheckTurn(BattlePlayer, Mob_, Button);
                PaintDamageGiven(1);
                AttackingAnimation(false);
                Canvas.SetLeft(CharacterSkill, Canvas.GetLeft(Person1) + 82);
                CharacterSkill.Source = null;
                ChosenSkill           = null;
            }

            BattleController.FinishBattle(BattlePlayer, Mob_);
        }
예제 #2
0
        private void MobAttackHandler(object sender, object e)
        {
            if (MobsDefeated)
            {
                return;
            }
            if (!ControllerGame.IsSkillHitting(Knife, Person1))
            {
                Canvas.SetLeft(Knife, Canvas.GetLeft(Knife) - 45);
            }

            else if (ControllerGame.IsSkillHitting(Knife, Person1))
            {
                Knife.Opacity = 0;
                Canvas.SetLeft(Knife, InitialKnifePosition);
                PaintDamageGiven(2);

                btnSkillBasic.IsEnabled = true;
                btnSkillOne.IsEnabled   = true;
                btnSkillTwo.IsEnabled   = true;
                AnimationEnabled        = false;
                MobAttackTimer.Stop();
            }
        }