public void plane_spawner(IdList a, string then) { spawn_position.z = a.Long; spawn_position.x = a.Lat; spawn_position.y = (int)(a.Alt * 0.0003048f); GameObject plo = this_plane(a.Mil); GameObject se = Instantiate(plo, spawn_position, Quaternion.identity, parent); plane_info plane_tmp = se.GetComponent <plane_info>(); plane_tmp.Id = a.Id; plane_tmp.Reg = a.Reg; plane_tmp.Icao = a.Icao; plane_tmp.Call = a.Call; plane_tmp.Type = a.Type; plane_tmp.Mdl = a.Mdl; plane_tmp.From = a.From; plane_tmp.To = a.To; plane_tmp.Op = a.Op; plane_tmp.Alt = (int)spawn_position.y; plane_tmp.Spd = a.Spd; plane_tmp.Lat = a.Lat; plane_tmp.Long = a.Long; plane_tmp.Trak = a.Trak; plane_tmp.Mil = a.Mil; se.name = a.Icao; plane_tmp.front_show = plane_tmp.frGo(); plane_tmp._by = then; a.plane = se; a.front_show = plane_tmp.front_show; pl_List.Add(a); text_reload(); }
public void set_info() { plane_is = GameObject.Find("CitySimulatorMap/" + _tmp_plane); plane_info in_plane = plane_is.GetComponent <plane_info>(); if (plane_is != null) { plane_id.text = "id: " + in_plane.Id; plane_reg.text = "registration: " + in_plane.Reg; plane_Icao.text = "ICao: " + in_plane.Icao; plane_call.text = "Call: " + in_plane.Call; plane_type.text = "plane type: " + in_plane.Type; plane_mdl.text = "plane full model name: " + in_plane.Mdl; plane_from.text = "from: " + in_plane.From; plane_to.text = "To: " + in_plane.To; plane_op.text = "Operator: " + in_plane.Op; plane_alt.text = "Alt (km): " + in_plane.Alt * 10; plane_spd.text = "speed: " + in_plane.Spd; plane_lat.text = "Lat: " + in_plane.Lat; plane_long.text = "Long: " + in_plane.Long; plane_track.text = "Direction: " + in_plane.Trak; plane_mill.text = "military: " + in_plane.Mil; if (in_plane.ats == "200") { img_full.SetActive(true); string url = in_plane.link_img; StartCoroutine(GetImageFromWeb(url)); } else { img_full.SetActive(false); } } }
public void plane_update(IdList a) { GameObject _tmp = GameObject.Find(a.Icao); plane_info p_tmp = _tmp.GetComponent <plane_info>(); p_tmp.Long = a.Long; p_tmp.Lat = a.Lat; p_tmp.Alt = (int)(a.Alt * 0.0003048f); p_tmp.Id = a.Id; p_tmp.Reg = a.Reg; p_tmp.Call = a.Call; p_tmp.Type = a.Type; p_tmp.Mdl = a.Mdl; p_tmp.From = a.From; p_tmp.To = a.To; p_tmp.Op = a.Op; p_tmp.Spd = a.Spd; p_tmp.Trak = a.Trak; text_reload(); }