Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Worldspace
- {
- public int Direction;
- public Double X;
- public Double Y;
- public Double Z;
- public static Worldspace Parse(string input)
- {
- Worldspace result = new Worldspace();
- var array = input.Replace("[","").Replace("]","").Split(',');
- Int32.TryParse(array[0], out result.Direction);
- Double.TryParse(array[1], out result.X);
- Double.TryParse(array[2], out result.Y);
- Double.TryParse(array[3], out result.Z);
- return result;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement