Advertisement
parabola949

Worldspace Class (DayZ)

Dec 9th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. class Worldspace
  2.     {
  3.         public int Direction;
  4.         public Double X;
  5.         public Double Y;
  6.         public Double Z;
  7.         public static Worldspace Parse(string input)
  8.         {
  9.             Worldspace result = new Worldspace();
  10.             var array = input.Replace("[","").Replace("]","").Split(',');
  11.             Int32.TryParse(array[0], out result.Direction);
  12.             Double.TryParse(array[1], out result.X);
  13.             Double.TryParse(array[2], out result.Y);
  14.             Double.TryParse(array[3], out result.Z);  
  15.             return result;
  16.         }
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement