Ejemplo n.º 1
0
 public void kill()
 {
     DestroyImmediate(billboard, true);
     //DestroyImmediate(signboard, true);
     DestroyImmediate(marker.gameObject, true);
     basic_poi  = null;
     detail_poi = null;
     map        = null;
     marker     = null;
     DestroyImmediate(this, true);
 }
Ejemplo n.º 2
0
        public Poi(PoiJsonResponse_Poi p)
        {
            if (map == null)
            {
                map = GameObject.Find("Map").GetComponent <Map>();
            }
            this.lat              = p.pos_lat;
            this.lon              = p.pos_lon;
            this.id               = p.id;
            this.bearing          = p.bearing;
            this.elevation        = p.elevation;
            this.original_name    = p.original_name;
            this.super_categories = p.super_categories;
            this.basic_poi        = p;
            billboard             = Instantiate(Resources.Load("billboard"), new Vector3(0, -15, 0), Quaternion.identity) as GameObject;
            billboard.transform.SetParent(GameObject.Find("PoiContainer").transform);
            //  signboard = Instantiate(Resources.Load("signboard"), new Vector3(0, -15, 0), Quaternion.identity) as GameObject;
            billboard.GetComponent <Billboard>().init(this.lat, this.lon, this.bearing, this);
            //signboard.GetComponent<Signboard>().init(this.lat, this.lon, this.bearing, this);

            marker = (Instantiate(Resources.Load("Marker"), new Vector3(0, -14f, 0), Quaternion.identity) as GameObject).GetComponent <Marker>();
            marker.init(this, this.lat, this.lon);
            updatePoi(0);
        }