Exemplo n.º 1
0
 public void RefreshDynamicElements(Player player, Friend friend)
 {
     this.DynamicElements["playerBeerBelly"].Text = player.BeerBelly.ToString();
     this.DynamicElements["playerLife"].Text = player.Life.ToString();
     this.DynamicElements["playerHealth"].Text = player.Health.ToString(CultureInfo.CurrentUICulture);
     this.DynamicElements["friendLife"].Text = friend.Life.ToString();
     this.DynamicElements["friendHealth"].Text = friend.Health.ToString(CultureInfo.CurrentUICulture);
 }
Exemplo n.º 2
0
        private void PopulateDynamicElements(Player player, Friend friend)
        {
            this.DynamicElements.Add("playerBeerBelly", new TextBlock()
            {
                Name = "playerBeerBelly",
                Text = player.BeerBelly.ToString(),
                HorizontalAlignment = HorizontalAlignment.Left,
                TextWrapping = TextWrapping.Wrap,
                VerticalAlignment = VerticalAlignment.Top,
                Width = 39,
                Margin = new Thickness(677, 30, 0, 0)
            });

            this.DynamicElements.Add("playerLife", new TextBlock()
            {
                Name = "playerLife",
                Text = player.Life.ToString(),
                Margin = new Thickness(373, 30, 0, 0),
                Width = 18,
                HorizontalAlignment = HorizontalAlignment.Left,
                TextWrapping = TextWrapping.Wrap,
                VerticalAlignment = VerticalAlignment.Top,
            });
            this.DynamicElements.Add("friendLife", new TextBlock()
            {
                Name = "friendLife",
                Text = friend.Life.ToString(),
                Margin = new Thickness(373, 80, 0, 0),
                Width = 18,
                HorizontalAlignment = HorizontalAlignment.Left,
                TextWrapping = TextWrapping.Wrap,
                VerticalAlignment = VerticalAlignment.Top,
            });
            this.DynamicElements.Add("playerHealth", new TextBlock()
            {
                Name = "plyerHealth",
                Text = player.Health.ToString(CultureInfo.CurrentUICulture),
                Margin = new Thickness(459, 30, 0, 0),
                Width = 28,
                HorizontalAlignment = HorizontalAlignment.Left,
                TextWrapping = TextWrapping.Wrap,
                VerticalAlignment = VerticalAlignment.Top,
            });

            this.DynamicElements.Add("friendHealth", new TextBlock()
            {
                Name = "friendHealth",
                Text = friend.Health.ToString(CultureInfo.CurrentUICulture),
                Margin = new Thickness(459, 80, 0, 0),
                Width = 28,
                HorizontalAlignment = HorizontalAlignment.Left,
                TextWrapping = TextWrapping.Wrap,
                VerticalAlignment = VerticalAlignment.Top,
            });
        }
Exemplo n.º 3
0
 public Bullet(Player player)
 {
     this.AvatarUri = AppSettings.BulletItemAvatar;
     this.IsFlaying = true;
     this.Size = new Size(AppSettings.BulletSize.Width, AppSettings.BulletSize.Height);
     this.Direction = player.LastMoveDirection;
     this.Player = player;
     this.Range = player.AggressionRange;
     this.Damage = player.Aggression;
     this.SetPosition();
     this.SetRangeBorders();
 }
Exemplo n.º 4
0
 public void PopulateElements(Player player, Friend friend)
 {
     this.PopulateStaticElements();
     this.PopulateDynamicElements(player, friend);
 }