Ejemplo n.º 1
0
    public static void createPotentialPOI(Pos node)
    {
        if (groupMaterials.Count == 0)
        {
            loadGroupMaterials();
        }

        if (isInterestingPOI(node))
        {
            string group = getGroup(node);
            if (group != null)
            {
                if (!groups.ContainsKey(group))
                {
                    groups.Add(group, new GameObject(group));
                }

                GameObject poi = Instantiate(Game.instance.poiObject, Game.getCameraPosition(node) + Game.instance.poiObject.transform.position, Game.instance.poiObject.transform.rotation, groups [group].transform) as GameObject;
                poi.name = (node.hasTag("name") ? node.getTagValue("name") : "") + "(POI:" + node.Id + ")";
                POIIcon poiIcon = poi.GetComponent <POIIcon> ();
                poiIcon.node  = node;
                poiIcon.group = group;
            }
        }
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        type = TYPE_POI;
        // Check for stored information in POIIcon
        POIIcon poi = GetComponent <POIIcon> ();

        base.name       = poi.getName();
        group           = poi.getGroup();
        address         = poi.getAddress();
        peopleGoingHere = poi.getPeopleGoingHere();
    }