//Constructor
 public Soldier()
 {
     //hp=? , atk=? , range = ? , speed =?
     HP = 100;
     MAX_HP = 100;
     ATK = 1;
     RANGE = 1;
     SPEED = 1;
     APS = 100;
     POSITION = 0;
     PRICE = 0;
     Image = new GifImage();
     spImg = new StackPanel();
 }
        public Soldier(int hp, int atk, int range, double speed, bool enemy, int price)
        {
            HP = hp;
            MAX_HP = hp;
            ATK = atk;
            RANGE = range;
            SPEED = speed;
            isEnemy = enemy;
            APS = 100;
            PRICE = price;
            Image = new GifImage();
            spImg = new StackPanel();

            if (isEnemy)
                POSITION = 1100;
            else
                POSITION = 0;
        }
        private void SkillAnimate()
        {
            if (beam != null)
                grid.Children.Remove(beam);

            beam = new GifImage();
            beam.HorizontalAlignment = HorizontalAlignment.Right;
            beam.VerticalAlignment = VerticalAlignment.Bottom;
            beam.Width = 880;
            beam.Margin = new Thickness(0, 0, 120, 10);
            var _image = new BitmapImage();
            _image.BeginInit();
            _image.UriSource = new Uri(gifSource, UriKind.Absolute);
            _image.EndInit();
            ImageBehavior.SetAnimatedSource(beam, _image);
            ImageBehavior.SetRepeatBehavior(beam, new RepeatBehavior(1));
            grid.Children.Add(beam);
        }
        public void LabelSetting()
        {
            ImgTower = new GifImage();
            lbTowerHP = new Label();
            lbHP_BG = new Label();

            ImgTower.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
            ImgTower.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
            lbTowerHP.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
            lbTowerHP.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            lbHP_BG.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
            lbHP_BG.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;

            string imgSource = Directory.GetCurrentDirectory();
            imgSource = imgSource.Replace("\\", "/");
            imgSource+="/Images/tower_test2.gif";
            if (isEnemy)
            {

                ImgTower.Margin = new System.Windows.Thickness(0, 0, 986, 15);
                var _image = new BitmapImage();
                _image.BeginInit();
                _image.UriSource = new Uri(imgSource, UriKind.Absolute);
                _image.EndInit();
                ImageBehavior.SetAnimatedSource(ImgTower, _image);

                lbHP_BG.Margin = new System.Windows.Thickness(35, 0, 0, 10);
                lbTowerHP.Margin = new System.Windows.Thickness(35, 0, 0, 10);
            }
            else
            {
                ImgTower.Margin = new System.Windows.Thickness(0, 0, 36, 15);
                var _image = new BitmapImage();
                _image.BeginInit();
                _image.UriSource = new Uri(imgSource, UriKind.Absolute);
                _image.EndInit();
                ImageBehavior.SetAnimatedSource(ImgTower, _image);

                lbHP_BG.Margin = new System.Windows.Thickness(857, 0, 0, 10);
                lbTowerHP.Margin = new System.Windows.Thickness(857, 0, 0, 10);
            }
            ImgTower.Height = 200;
            ImgTower.Width = 120;
            lbTowerHP.Width = 200;
            lbTowerHP.Height = 25;
            lbTowerHP.Background = Brushes.Red;
            lbTowerHP.BorderBrush = Brushes.Black;
            lbTowerHP.BorderThickness = new System.Windows.Thickness(2, 2, 2, 2);

            lbHP_BG.Width = 200;
            lbHP_BG.Height = 25;
            lbHP_BG.Background = Brushes.Black;
        }