/// <summary>
 /// Move shape to specific absolute position
 /// </summary>
 public static void MoveShape(Shape shape, Utils.Point position)
 {
     Canvas.SetLeft(shape, position.X);
     Canvas.SetTop(shape, position.Y);
 }
Exemple #2
0
 public Walrus(Utils.Point location, Map map)
     : base(location.X, location.Y, new SpriteSheet(Screen.ContentManager.LoadTexture("Images/Walrus"), 24, 24), "TAIL_DOWN", 5000)
 {
 }
        public static Ellipse CreateNewEllipse(int size, System.Windows.Media.Color color, Utils.Point position)
        {
            Ellipse e = new Ellipse();

            Instance.GameCanvas.Children.Add(e);
            e.Width           = size;
            e.Height          = size;
            e.Fill            = new SolidColorBrush(color);
            e.Stroke          = new SolidColorBrush(System.Windows.Media.Color.FromRgb(0, 0, 0));
            e.StrokeThickness = 2;
            MoveShape(e, position);
            return(e);
        }