private void Window_MouseDown(object sender, MouseButtonEventArgs e)
 {
     if (Mouse.LeftButton == MouseButtonState.Pressed)
     {
         projectiles.Add(new Projectile(Canvas, this, playerPoint));
     }
     if (Mouse.RightButton == MouseButtonState.Pressed)
     {
         Melee melee = new Melee(Canvas, this, playerPoint);
     }
     //MessageBox.Show(e.GetPosition(Canvas).ToString());
 }
        public MainWindow()
        {
            InitializeComponent();
            bool isGenerated = false;

            if (isGenerated == false)
            {
                map.MapGenerate(Canvas, door1, door2, door3, wallTop1, wallTop2, wallLeft1, wallLeft2, wallRight1, wallRight2, wallBot1, wallBot2);
                enemies.Add(new Enemy(Canvas, enemyPoint));
                Melee melee = new Melee(Canvas, this, playerPoint);
                player.GeneratePlayer(Canvas, playerPoint);
                isGenerated = true;
            }

            GameTimer.Tick    += GameTimer_Tick;
            GameTimer.Interval = new TimeSpan(0, 0, 0, 0, 1000 / 60);//fps
            GameTimer.Start();

            projectileTimer.Tick    += MovementTimer_Tick;
            projectileTimer.Interval = new TimeSpan(0, 0, 0, 0, 1000 / 60);
            projectileTimer.Start();
        }