Beispiel #1
0
    void Start()
    {
        this.GetComponent<StartMenuManager>().SetUpStartMenu();

        configScript =
            GameObject.FindWithTag( TAGS.CONFIG ).GetComponent< Config >();

        thrash =
            GameObject.FindWithTag( TAGS.THRASH ).gameObject;

        leftHandButton = new ToggleButton();
        rightHandButton = new ToggleButton();
        azertyButton = new ToggleButton();
        qwertyButton = new ToggleButton();

        leftHandButton.SetButtonFont(ControlButtonFont);
        rightHandButton.SetButtonFont(ControlButtonFont);
        azertyButton.SetButtonFont(ControlButtonFont);
        qwertyButton.SetButtonFont(ControlButtonFont);

        leftHandButton.SetBackground(SelectedBackground,UnselectedBackground);
        rightHandButton.SetBackground(SelectedBackground,UnselectedBackground);
        azertyButton.SetBackground(SelectedBackground,UnselectedBackground);
        qwertyButton.SetBackground(SelectedBackground,UnselectedBackground);

        if( configScript.HandState == HAND_STATE.LEFT )
        {
            SetLeftHanded();
        }
        else
        {
            SetRightHanded();
        }

        if( configScript.KeyboardState == KEYBOARD_STATE.AZERTY )
        {
            SetAzerty();
        }
        else
        {
            SetQwerty();
        }

        PlayActionSound();
    }