Beispiel #1
0
    void updateTourListOnAdd(string name, string time)
    {
        GameObject           newSchedule = Instantiate(ListItemPrefab) as GameObject;
        LocationWithTimeItem controller  = newSchedule.GetComponent <LocationWithTimeItem>();

        controller.Name.text             = name;
        controller.Time.text             = time;
        newSchedule.transform.parent     = ContentPanel.transform;
        newSchedule.transform.localScale = Vector3.one;
    }
Beispiel #2
0
    void createScheduleList()
    {
        foreach (string s in locationsData.Keys)
        {
            GameObject newSchedule = Instantiate(ListItemPrefab) as GameObject;

            LocationWithTimeItem controller = newSchedule.GetComponent <LocationWithTimeItem>();
            controller.Name.text             = s;
            controller.Time.text             = "Time : " + locationsData[s];
            newSchedule.transform.parent     = ContentPanel.transform;
            newSchedule.transform.localScale = Vector3.one;
        }
        locationsDisplayed = true;
    }