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); }
public FrameProperty() { Id = 0; Name = "Default"; Color = Color.Magenta; UV = new Vector2Short(0, 0); //Anchor = FrameAnchor.None; }
public FrameProperty(int id, string name, Vector2Short uv) : this() { Id = id; Name = name; UV = uv; }
public bool Equals(Vector2Short other) { return(other.Y == Y && other.X == X); }