Ejemplo n.º 1
0
    public void LoadOptions()
    {
        myOptions = SaveOptionsSystem.LoadOptions("Options.txt") as MySaveOptions;

        mainSoundSlider.value  = myOptions.mainSoundLevel;
        BGSoundSlider.value    = myOptions.backgroundSoundLevel;
        musicSoundSlider.value = myOptions.musicSoundLevel;
        renderSlider.value     = myOptions.renderDistance;

        abilityCode[0] = myOptions.firstAbility;
        abilityButton[0].GetComponentInChildren <Text>().text = abilityCode[0].ToString();

        abilityCode[1] = myOptions.secondAbility;
        abilityButton[1].GetComponentInChildren <Text>().text = abilityCode[1].ToString();

        abilityCode[2] = myOptions.thirdAbility;
        abilityButton[2].GetComponentInChildren <Text>().text = abilityCode[2].ToString();

        abilityCode[3] = myOptions.fourthAbility;
        abilityButton[3].GetComponentInChildren <Text>().text = abilityCode[3].ToString();

        abilityCode[4] = myOptions.fifthAbility;
        abilityButton[4].GetComponentInChildren <Text>().text = abilityCode[4].ToString();

        abilityCode[5] = myOptions.sixthAbility;
        abilityButton[5].GetComponentInChildren <Text>().text = abilityCode[5].ToString();

        abilityCode[6] = myOptions.seventhAbility;
        abilityButton[6].GetComponentInChildren <Text>().text = abilityCode[6].ToString();

        for (int i = 0; i < SM.GetComponent <SceneManager>().abilityCode.Length; i++)
        {
            SM.GetComponent <SceneManager>().abilityCode[i] = abilityCode[i]; Debug.Log(abilityCode[i].ToString());
        }
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        currentPlayer = GameObject.FindGameObjectWithTag("Player");
        SM            = GameObject.FindGameObjectWithTag("SceneManager");
        myOptions     = new MySaveOptions();

        LoadOptions();

        //
        updateBGSound();
        updateMainSound();
        updateMusic();
        updateRenderDist();
    }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        MySaveOptions myOptions = SaveOptionsSystem.LoadOptions("Options.txt") as MySaveOptions;

        mainSoundLevel = myOptions.mainSoundLevel;
        BGSoundLevel   = myOptions.backgroundSoundLevel;
        musicLevel     = myOptions.musicSoundLevel;
        renderDist     = myOptions.renderDistance;

        abilityCode[0] = myOptions.firstAbility;
        abilityCode[1] = myOptions.secondAbility;
        abilityCode[2] = myOptions.thirdAbility;
        abilityCode[3] = myOptions.fourthAbility;
        abilityCode[4] = myOptions.fifthAbility;
        abilityCode[5] = myOptions.sixthAbility;
        abilityCode[6] = myOptions.seventhAbility;
    }