public override void Attaquer(Joueur joueurAdverse, MainWindow mw)
        {
            if (typeCurrentElement == ElemType.Unknown)
            {
                return;
            }
            base.Attaquer(joueurAdverse, mw);
            ProjectileUserControl projectile = new ProjectileUserControl()
            {
                TypeProjectile = typeCurrentElement
            };

            projectile.SetValue(Canvas.RightProperty, 140.0);
            projectile.SetValue(Canvas.BottomProperty, 140.0);
            mw.canvasJeu.Children.Add(projectile);
            DeplacementProjectile(projectile, mw, joueurAdverse);
            RemiseAZeroElementPret(mw);
        }
示例#2
0
        public virtual async void DeplacementProjectile(ProjectileUserControl projectile, MainWindow mw, Joueur joueurAdverse)
        {
            await AnimateProjectile(projectile, 4000, mw, joueurAdverse, projectile.TypeProjectile).ContinueWith(t => mw.Dispatcher.Invoke(() => mw.canvasJeu.Children.Remove(projectile)));

            PostureMageStatique(mw);
        }