//O = !! e.widget, //C = !! e.screensaver, public void FocusPickedCountry(float fDist) // function E(e) { // 点击国家 { // if (!O && !C) {// 不在widget和screensaver状态下 float r = 5f; // var r = 5;// 鼠标按下和抬起间移动距离 if (fDist < r) // if (!(e > r)) { { if (pick.picked_country_id == 0) // if (z.pick_index < 0) return o(null), { //o(null); a(false);// void a(); return; } t(); // t(); // var n = he.countries[z.pick_index]; // n === j ? (o(null), a()) : (vec3.set(z.geocam.coord_target, n.center[0], n.center[1], U), o(n)), if (curPickedCountryId != pick.picked_country_id) { curPickedCountryId = pick.picked_country_id; if (curPickedCountryId >= 300) { //curPickedCountryId = 89; ChinaDetailData cdd = ChinaProvinceCity.Instance.cdd; Vector3 v3Target = Vector3.zero; if (cdd.bIncCity && curPickedCountryId >= cdd.iCityIdBeg) { v3Target = cdd.china_cities[curPickedCountryId - cdd.iCityIdBeg].center_location; } else { v3Target = cdd.china_provinces[curPickedCountryId - 301].center_location; } geocam.coord_target.Set(v3Target.x, v3Target.y, geocam.coord[2]); JSInterface.Instance.OnAreaClicked(curPickedCountryId); } else { if (Country.dic_pick_index.ContainsKey(curPickedCountryId)) { country_data c_data = Country.dic_pick_index[curPickedCountryId]; geocam.coord_target.Set(c_data.center_location[0], c_data.center_location[1], geocam.coord[2]); JSInterface.Instance.OnAreaClicked(curPickedCountryId); } } //o(n) } else { //o(null); a(); } //D(null); // D(null) } }
void SetPickedUid(country_data cd) { if (cd.byType == 0) { Shader.SetGlobalFloat("My_province_picked_uid", cd.uid); } else if (cd.byType == 1) { Shader.SetGlobalFloat("My_city_picked_uid", cd.uid); } else if (cd.byType == 3) { Shader.SetGlobalFloat("My_municipalities_picked_uid", cd.uid); } }
// function v(e, t) { // if (0 === t) return !1; // var r = he.key_to_country[t]; // return r ? (f(e, r.cities), he.geoip && r == he.geoip.country ? e[2] = 0.014 : e[2] = 0, !0) : !1 // } bool TryGetCoord(ref Vector3 e, uint t) { if (t == 0u) { return(false); } country_data c_data = null; if (Country.dic_pick_index.TryGetValue((int)t, out c_data)) { GetRandomCityCoord(ref e, c_data.cities_data); e.z = 0f; return(true); } else { return(false); } }