public Human(Canvas canv, TextBox logg, string uid, int rand_seed = -1) { this.uid = uid; //parts.AddTextBox(new TextBox { Width = 100, Height = 20, Visibility = Visibility.Collapsed }, 0, -20); parts.AddImage(new Image { Name = $"body_{uid}", Width = 100, Height = 100, Source = new BitmapImage(new Uri(@"D:\PROJECTS\SomeGameWPF\SomeGameWPF\images\human.png")), HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, }, 0, 0); tb_msg = new TextBox { Width = 100, Height = 20, Text = "Дратути!", Visibility = Visibility.Hidden }; tb_msg.BorderThickness = new Thickness(0); Canvas.SetZIndex(tb_msg, 1001); parts.AddTextBox(tb_msg, 100, -70); msg = new Image { Name = $"msg_{uid}", Width = 150, Height = 150, Source = new BitmapImage(new Uri(@"D:\PROJECTS\SomeGameWPF\SomeGameWPF\images\cloud.png")), HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, Visibility = Visibility.Hidden, }; Canvas.SetZIndex(msg, 1000); parts.AddImage(msg, 70, -140); rand = (rand_seed > 0) ? new Random(rand_seed) : new Random(); canvas = canv; logging = logg; }