Exemplo n.º 1
0
        public static bool Parse(string text, out Vector2Short vector)
        {
            vector = new Vector2Short();
            if (string.IsNullOrWhiteSpace(text))
            {
                return(false);
            }

            var split = text.Split(',', 'x');

            if (split.Length != 2)
            {
                return(false);
            }
            short x, y;

            if (short.TryParse(split[0], out x) ||
                short.TryParse(split[1], out y))
            {
                return(false);
            }

            vector = new Vector2Short(x, y);
            return(true);
        }
Exemplo n.º 2
0
 public FrameProperty()
 {
     Id    = 0;
     Name  = "Default";
     Color = Color.Magenta;
     UV    = new Vector2Short(0, 0);
     //Anchor = FrameAnchor.None;
 }
Exemplo n.º 3
0
 public FrameProperty(int id, string name, Vector2Short uv) : this()
 {
     Id   = id;
     Name = name;
     UV   = uv;
 }
Exemplo n.º 4
0
 public bool Equals(Vector2Short other)
 {
     return(other.Y == Y && other.X == X);
 }