Ejemplo n.º 1
0
    void Customize()
    {
        Skins.gameObject.SetActive(true);
        Particle.gameObject.SetActive(false);
        Skins.SetAsLastSibling();
        Invoke("ActiveColorUI", 0.7f);
        if (ControllerManager.Mouse_Controller == 1)
        {
            EventSystem.current.SetSelectedGameObject(null);
        }
        else
        {
            EventSystem.current.SetSelectedGameObject(null);
            EventSystem.current.SetSelectedGameObject(skinbutton);
        }

        if (Input.GetButtonDown("X"))
        {
            EventSystem.current.SetSelectedGameObject(null);
            EventSystem.current.SetSelectedGameObject(ColorPickerButton);
        }
        if (Input.GetButtonDown("Y"))
        {
            EventSystem.current.SetSelectedGameObject(null);
            EventSystem.current.SetSelectedGameObject(skinbutton);
        }
        menuAnim.SetBool("Menu", false);
        menuAnim.SetBool("SkinSelector", true);
        menuAnim.SetBool("SkinSelectorToSettings", false);
        menuAnim.SetBool("SettingsToSkinSelector", true);
        menuAnim.SetBool("LocationsToSkinSelector", true);
        menuAnim.SetBool("MultiplayerToSkinSelector", true);
    }
Ejemplo n.º 2
0
    private void Back()
    {
        Skins.gameObject.SetActive(true);
        Particle.gameObject.SetActive(false);
        Skins.SetAsLastSibling();
        FirstButton.GetComponent <Animator>().updateMode = AnimatorUpdateMode.Normal;
        if (ControllerManager.Mouse_Controller == 1)
        {
            EventSystem.current.SetSelectedGameObject(null);
        }
        else
        {
            EventSystem.current.SetSelectedGameObject(null);

            EventSystem.current.SetSelectedGameObject(FirstButton);
        }

        ColorPickerUI.GetComponent <ColorPickerUnityUI>().enabled = false;
        menuAnim.SetBool("Menu", true);
        menuAnim.SetBool("SkinSelectorToSettings", false);
        menuAnim.SetBool("Settings", false);
        menuAnim.SetBool("SettingsToSkinSelector", false);
        menuAnim.SetBool("SkinSelector", false);
        menuAnim.SetBool("MenuToLocations", false);
        menuAnim.SetBool("LocationsToSkinSelector", false);
        menuAnim.SetBool("LocationsToOptions", false);
        menuAnim.SetBool("MenuToMultiplayer", false);
        menuAnim.SetBool("MultiplayerToOptions", false);
        menuAnim.SetBool("MultiplayerToSkinSelector", false);
    }
Ejemplo n.º 3
0
 void Multiplayer()
 {
     Skins.gameObject.SetActive(true);
     Particle.gameObject.SetActive(false);
     Skins.SetAsLastSibling();
     menuAnim.SetBool("Menu", false);
     menuAnim.SetBool("SkinSelector", false);
     menuAnim.SetBool("SkinSelectorToSettings", false);
     menuAnim.SetBool("SettingsToSkinSelector", false);
     menuAnim.SetBool("LocationsToSkinSelector", false);
     menuAnim.SetBool("MenuToMultiplayer", true);
     menuAnim.SetBool("MultiplayerToOptions", false);
     menuAnim.SetBool("MultiplayerToSkinSelector", false);
 }
Ejemplo n.º 4
0
    private void Jogar()
    {
        Skins.SetAsLastSibling();
        menuAnim.SetBool("MenuToLocations", true);
        menuAnim.SetBool("Menu", false);
        if (ControllerManager.Mouse_Controller == 1)
        {
            EventSystem.current.SetSelectedGameObject(null);
        }
        else
        {
            EventSystem.current.SetSelectedGameObject(null);

            EventSystem.current.SetSelectedGameObject(LocationsButton);
        }
    }
Ejemplo n.º 5
0
 void Settings()
 {
     Skins.gameObject.SetActive(true);
     Particle.gameObject.SetActive(false);
     Skins.SetAsLastSibling();
     if (ControllerManager.Mouse_Controller == 1)
     {
         EventSystem.current.SetSelectedGameObject(null);
     }
     else
     {
         //EventSystem.current.SetSelectedGameObject(null);
         //EventSystem.current.SetSelectedGameObject(OptionsButton);
     }
     menuAnim.SetBool("Menu", false);
     menuAnim.SetBool("SkinSelectorToSettings", true);
     menuAnim.SetBool("SettingsToSkinSelector", false);
     menuAnim.SetBool("Settings", true);
     menuAnim.SetBool("LocationsToOptions", true);
     menuAnim.SetBool("MultiplayerToOptions", true);
 }
Ejemplo n.º 6
0
    void Update()
    {
        if (SceneManager.GetActiveScene().name != nomeDaCena)
        {
            masterMixer.SetFloat("Master", VOLUME);
            masterMixer.SetFloat("SFX", SFXSound);
            masterMixer.SetFloat("Music", MusicSound);
        }

        if (ControllerManager.Mouse_Controller == 0 && OnController == true)
        {
            Back();
            OnController = false;
        }
        else if (ControllerManager.Mouse_Controller == 1)
        {
            OnController = true;
        }

        if (Input.GetButtonDown("B") || Input.GetKeyDown(KeyCode.Escape))
        {
            Back();
        }
        if (Input.GetButtonDown("Select"))
        {
            EventSystem.current.SetSelectedGameObject(null);

            EventSystem.current.SetSelectedGameObject(HomeButtonSelected);
            ColorPickerUI.GetComponent <ColorPickerUnityUI>().enabled = false;
        }
        if (ControllerManager.Xbox_One_Controller == 1)
        {
            if (menuAnim.GetBool("Settings") == true)
            {
                switch (SettingsPage)
                {
                case 0:
                    Window.SetAsLastSibling();
                    break;

                case 1:
                    Graphics.SetAsLastSibling();
                    break;

                case 2:
                    Audio.SetAsLastSibling();
                    break;

                case 3:
                    Data.SetAsLastSibling();
                    break;

                case 4:
                    Language.SetAsLastSibling();
                    break;
                }

                if (Input.GetButtonDown("RB"))
                {
                    SettingsPage++;

                    switch (SettingsPage)
                    {
                    case 0:
                        EventSystem.current.SetSelectedGameObject(null);
                        EventSystem.current.SetSelectedGameObject(PageSelector1);
                        break;

                    case 1:
                        EventSystem.current.SetSelectedGameObject(null);
                        EventSystem.current.SetSelectedGameObject(PageSelector2);
                        break;

                    case 2:
                        EventSystem.current.SetSelectedGameObject(null);
                        EventSystem.current.SetSelectedGameObject(PageSelector3);
                        break;

                    case 3:
                        EventSystem.current.SetSelectedGameObject(null);
                        EventSystem.current.SetSelectedGameObject(PageSelector4);
                        break;

                    case 4:
                        EventSystem.current.SetSelectedGameObject(null);
                        EventSystem.current.SetSelectedGameObject(PageSelector5);
                        break;
                    }


                    if (SettingsPage > 4)
                    {
                        SettingsPage = 4;
                    }
                }

                if (Input.GetButtonDown("LB"))
                {
                    SettingsPage--;
                    switch (SettingsPage)
                    {
                    case 0:
                        EventSystem.current.SetSelectedGameObject(null);
                        EventSystem.current.SetSelectedGameObject(PageSelector1);
                        break;

                    case 1:
                        EventSystem.current.SetSelectedGameObject(null);
                        EventSystem.current.SetSelectedGameObject(PageSelector2);
                        break;

                    case 2:
                        EventSystem.current.SetSelectedGameObject(null);
                        EventSystem.current.SetSelectedGameObject(PageSelector3);
                        break;

                    case 3:
                        EventSystem.current.SetSelectedGameObject(null);
                        EventSystem.current.SetSelectedGameObject(PageSelector4);
                        break;

                    case 4:
                        EventSystem.current.SetSelectedGameObject(null);
                        EventSystem.current.SetSelectedGameObject(PageSelector5);
                        break;
                    }

                    if (SettingsPage < 0)
                    {
                        SettingsPage = 0;
                    }
                }
            }
            else
            {
                SettingsPage = 0;
            }
        }

        if (menuAnim.GetBool("SkinSelector") == true)
        {
            if (Input.GetButtonDown("X"))
            {
                EventSystem.current.SetSelectedGameObject(null);
                ColorPickerUI.GetComponent <ColorPickerUnityUI>().enabled = true;
            }
            if (Input.GetButtonDown("Y"))
            {
                EventSystem.current.SetSelectedGameObject(null);

                EventSystem.current.SetSelectedGameObject(skinbutton);
                ColorPickerUI.GetComponent <ColorPickerUnityUI>().enabled = false;
            }
            if (Input.GetButtonDown("RB"))
            {
                Skins.gameObject.SetActive(false);
                Particle.gameObject.SetActive(true);
                Particle.SetAsLastSibling();
            }
            if (Input.GetButtonDown("LB"))
            {
                Skins.gameObject.SetActive(true);
                Particle.gameObject.SetActive(false);
                Skins.SetAsLastSibling();
            }
        }

        txtStars.text     = PlayerPrefs.GetInt("Stars").ToString();
        txtFragments.text = PlayerPrefs.GetInt("Fragments").ToString();
        SalvarPreferencias();
    }