Exemplo n.º 1
0
 void SaveConfig()
 {
     new ProfilControle(Input.GetJoystickNames()[CurrentController], "Joystick",
                        Btn_X.GetComponentInChildren <Text>().text, Invert_X.isOn,
                        Btn_Y.GetComponentInChildren <Text>().text, Invert_Y.isOn,
                        Btn_X2.GetComponentInChildren <Text>().text, Invert_X2.isOn,
                        Btn_Y2.GetComponentInChildren <Text>().text, Invert_Y2.isOn,
                        Btn_Jump.GetComponentInChildren <Text>().text,
                        Btn_Shoot.GetComponentInChildren <Text>().text
                        ).SaveProfil();
 }
Exemplo n.º 2
0
 void Reinit()
 {
     Btn_X.GetComponentInChildren <Text>().text = "";
     Invert_X.isOn = false;
     Btn_Y.GetComponentInChildren <Text>().text = "";
     Invert_Y.isOn = true;
     Btn_X2.GetComponentInChildren <Text>().text = "";
     Invert_X2.isOn = false;
     Btn_Y2.GetComponentInChildren <Text>().text = "";
     Invert_Y2.isOn = true;
     Btn_Jump.GetComponentInChildren <Text>().text  = "";
     Btn_Shoot.GetComponentInChildren <Text>().text = "";
     MessageUtilisateur.text = "";
 }
Exemplo n.º 3
0
    void LoadConfig()
    {
        if (PlayerPrefs.GetString(Input.GetJoystickNames()[CurrentController]) == "")
        {
            Reinit();
            return;
        }

        ProfilControle SavedProfil = ProfilControle.LoadProfil(Input.GetJoystickNames()[CurrentController]);

        Btn_X.GetComponentInChildren <Text>().text = SavedProfil.Axe_X;
        Invert_X.isOn = SavedProfil.InvertX;
        Btn_Y.GetComponentInChildren <Text>().text = SavedProfil.Axe_Y;
        Invert_Y.isOn = SavedProfil.InvertY;
        Btn_X2.GetComponentInChildren <Text>().text = SavedProfil.Axe_X2;
        Invert_X2.isOn = SavedProfil.InvertX2;
        Btn_Y2.GetComponentInChildren <Text>().text = SavedProfil.Axe_Y2;
        Invert_Y2.isOn = SavedProfil.InvertY2;
        Btn_Jump.GetComponentInChildren <Text>().text  = SavedProfil.Key_Jump;
        Btn_Shoot.GetComponentInChildren <Text>().text = SavedProfil.Key_Shoot;
    }