Exemplo n.º 1
0
    // This is called by 'start quest' on the main menu
    public void SelectQuest()
    {
        // Find any content packs at the location
        cd = new ContentData(gameType.DataDirectory());
        // Check if we found anything
        if (cd.GetPacks().Count == 0)
        {
            ValkyrieDebug.Log("Error: Failed to find any content packs, please check that you have them present in: " + gameType.DataDirectory() + System.Environment.NewLine);
            Application.Quit();
        }

        // Load configured packs
        cd.LoadContentID("");
        Dictionary <string, string> packs = config.data.Get(gameType.TypeName() + "Packs");

        if (packs != null)
        {
            foreach (KeyValuePair <string, string> kv in packs)
            {
                cd.LoadContentID(kv.Key);
            }
        }

        // Get a list of available quests
        Dictionary <string, QuestData.Quest> ql = QuestLoader.GetQuests();

        // Pull up the quest selection page
        new QuestSelectionScreen(ql);
    }
Exemplo n.º 2
0
    // This is called by 'start quest' on the main menu
    public void SelectQuest()
    {
        Dictionary <string, string> packs = config.data.Get(gameType.TypeName() + "Packs");

        if (packs != null)
        {
            foreach (KeyValuePair <string, string> kv in packs)
            {
                cd.LoadContentID(kv.Key);
            }
        }

        // Pull up the quest selection page
        if (questSelectionScreen == null)
        {
            go_questSelectionScreen = new GameObject("QuestSelectionScreen");
            questSelectionScreen    = go_questSelectionScreen.AddComponent <QuestSelectionScreen>();
        }
        else
        {
            questSelectionScreen.Show();
        }
    }