Example #1
0
        public static bool Parse(string text, out Vector3Int32 vector)
        {
            vector = new Vector3Int32();
            if (string.IsNullOrWhiteSpace(text))
            {
                return(false);
            }

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

            if (split.Length != 3)
            {
                return(false);
            }
            int x, y, z;

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

            vector = new Vector3Int32(x, y, z);
            return(true);
        }
Example #2
0
 public bool Equals(Vector3Int32 other)
 {
     return(other.X == X && other.Y == Y && other.Z == Z);
 }