Exemplo n.º 1
0
    ///Loads controls from the config file to ControlList.
    public void LoadControls(string filePath)
    {
        string[] keys = File.ReadAllLines(filePath);
        controlList.Reset();
        foreach (string key in keys)
        {
            if (key.Length > 0 && !key.Contains("#"))
            {
                if (key.Contains("AXIS"))
                {
                    axisList.AddAxis(key);
                }
                else
                {
                    controlList.AddKeybind(key);
                }
            }
        }

        // Debug.Log(controlList);
    }