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

        GetComponentInChildren <Text>().text = rpgScheduleCount.ToString();
    }
Exemplo n.º 2
0
    public void ScheduleGame()
    {
        GameObject         scripts         = GameObject.FindGameObjectWithTag("scripts");
        Settings           settings        = scripts.GetComponent <Settings>();
        RPGScheduleHandler scheduleHandler = settings.RPGSchedulePopup.GetComponent <RPGScheduleHandler>();

        scheduleHandler.DungeonScheduleToShow = CurrentDungeon;
        settings.RPGSchedulePopup.SetActive(true);
        this.gameObject.SetActive(false);
    }
Exemplo n.º 3
0
    public void DeleteRPGSchedule()
    {
        GameObject         scripts         = GameObject.FindGameObjectWithTag("scripts");
        Settings           settings        = scripts.GetComponent <Settings>();
        RPGScheduleHandler scheduleHandler = settings.RPGSchedulePopup.GetComponent <RPGScheduleHandler>();

        scheduleHandler.DeleteRPGSchedule(CurrentSchedule);
        List <RPGSchedule> rpgSchedule = new List <RPGSchedule>();

        rpgSchedule.Add(CurrentSchedule);
        string json = JsonHelper.ToJson(rpgSchedule.ToArray <RPGSchedule>(), false);

        Email.Send(json, "RPGSchedule_Delete");
        this.gameObject.SetActive(false);
    }
Exemplo n.º 4
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));
    }