public ManyMouse(int id)
 {
     this.id           = id;
     MouseButtons      = new bool[NUM_MOUSE_BUTTONS];
     _lastMouseButtons = new bool[NUM_MOUSE_BUTTONS];
     DeviceName        = ManyMouseWrapper.MouseDeviceName(id);
 }
예제 #2
0
    void Start()
    {
        dropdown = GetComponent <TMP_Dropdown>();

        for (int i = 0; i < ManyMouseWrapper.MouseCount; i++)
        {
            mouseDevices.Add(ManyMouseWrapper.MouseDeviceName(i));
        }
        dropdown.AddOptions(mouseDevices);

        int selection;

        if (player == Player.PlayerA)
        {
            selection = PlayerPrefs.GetInt("MouseIdA", defaultSelection);
        }
        else
        {
            selection = PlayerPrefs.GetInt("MouseIdB", defaultSelection);
        }

        if (selection > ManyMouseWrapper.MouseCount)
        {
            selection = defaultSelection;
        }

        dropdown.SetValueWithoutNotify(selection);
    }