public static Vec2 Deserialize(byte[] bytes) { var playObj = CodecUtils.DeserializePlayObject(bytes); return(new Vec2 { X = playObj.GetFloat("x"), Y = playObj.GetFloat("y") }); }
public static Move Deserialize(byte[] bytes) { var playObj = CodecUtils.DeserializePlayObject(bytes); return(new Move { Pos = playObj.Get <Vec2>("p"), Dir = playObj.Get <Vec2>("d"), Time = playObj.GetLong("t") }); }
public static Food Deserialize(byte[] bytes) { var playObj = CodecUtils.DeserializePlayObject(bytes); var food = new Food { Id = playObj.GetInt("id"), Type = playObj.GetInt("type"), X = playObj.GetFloat("x"), Y = playObj.GetFloat("y") }; return(food); }