示例#1
0
    private void ReadGameCount()
    {
        string path = TASRecorder.GetInputPath("game_count.txt");

        if (File.Exists(path))
        {
            GameCount = int.Parse(File.ReadAllText(path)) + 1;
        }
        else
        {
            GameCount = 1;
        }

        DataWriter.WriteAllText(path, GameCount.ToString());
    }
示例#2
0
    private void Initialize()
    {
        string path = TASRecorder.GetInputPath("game_count.txt");

        if (File.Exists(path))
        {
            GameCount = int.Parse(File.ReadAllText(path)) + 1;
        }
        else
        {
            GameCount = 1;
        }

        GameManager.Instance.DataWriter.WriteAllText(path, GameCount.ToString());
    }
示例#3
0
    private void Awake()
    {
        if (enabled)
        {
            InputBuffer.Instance.Manual = true;

            if (autoReadInputsFromFile)
            {
                string path = TASRecorder.GetInputPath(targetGameCount);
                if (File.Exists(path))
                {
                    inputs = JsonConvert.DeserializeObject <TASMap>(File.ReadAllText(path));
                }
            }
        }
    }