Пример #1
0
    public void LoadGameFromFile(string fileName)
    {
        // string json = File.ReadAllText($"{Application.persistentDataPath}/{jsonFileName}.json");
        string json = File.ReadAllText($"{Application.persistentDataPath}/{fileName}.json");

        activePromptCollection = JsonUtility.FromJson <PromptCollection>(json);
        PopulateContainers(activePromptCollection.prompts);
    }
Пример #2
0
    public void SavePromptCollection()
    {
        PromptCollection promptCollection = new PromptCollection(currentCollectionNameInput.text, prompts.ToArray(), DateTime.Now, DateTime.Now);
        string           fileName         = currentCollectionNameInput.text;
        string           json             = JsonUtility.ToJson(promptCollection);
        StreamWriter     writer           = File.CreateText($"{Application.persistentDataPath}/{fileName}.json");

        writer.Write(json);
        writer.Close();
        Debug.Log("prompt saved: " + json);
    }
Пример #3
0
 public async Task StreamPingAsync(ulong tweetId, [Remainder] string title)
 {
     var prompts = new PromptCollection <StreamPingArguments>(this)
                   .WithPrompt(Description, "Enter the message of the announcement");
 }