Ejemplo n.º 1
0
    public void UpdateCount()
    {
        //get users rpg schedule and display count
        int rpgScheduleCount = RPGScheduleHandler.GetScheduledRPGList().Count;

        GetComponentInChildren <Text>().text = rpgScheduleCount.ToString();
    }
Ejemplo n.º 2
0
    public void RefreshList()
    {
        List <RPGSchedule> rpgSchedules = new List <RPGSchedule>();

        //remove any buttons already in the list
        foreach (Button button in RPGScheduleListContentHolder.GetComponentsInChildren(typeof(Button)))
        {
            Destroy(button.gameObject);
        }

        //get RPGSchedules
        rpgSchedules = RPGScheduleHandler.GetScheduledRPGList();

        rpgSchedules = rpgSchedules.OrderBy(x => x.Name).ToList();

        rpgSchedules.ForEach(x => AddButton(x));
    }