public void FromBin(NetSocket.ByteArray bin, twp.app.resource.AreaResourceType type) { switch (type) { case twp.app.resource.AreaResourceType.AREA_RESOURCE_TYPE_RESOURCE: goto case twp.app.resource.AreaResourceType.AREA_RESOURCE_TYPE_RESOURCE_MAX; case twp.app.resource.AreaResourceType.AREA_RESOURCE_TYPE_RESOURCE_MAX: { resouce = new Resouce(); resouce.FromBin(bin); } break; case twp.app.resource.AreaResourceType.AREA_RESOURCE_TYPE_ENGINEER: goto case twp.app.resource.AreaResourceType.AREA_RESOURCE_TYPE_ENGINEER_MAX; case twp.app.resource.AreaResourceType.AREA_RESOURCE_TYPE_ENGINEER_MAX: { engineer = new Engineer(); engineer.FromBin(bin); } break; default: break; } }