/// <summary>
    /// Switches the base after a button click.
    /// If isLeft is true the base should be switched to the one on the left. If false its to the right.
    /// </summary>
    public void OnClickBaseSwitch()
    {
        if (!available)
        {
            return;
        }

        this.CheckPlayerBuilding();
        this.BaseSwitch.OnClickBaseSwitch(this.IsLeft);
        this.UpdateButtons();
        this.OtherButton.UpdateButtons();
        this.SoundControll.StartSound(SoundController.Sounds.SWITCHBASE_TO_MISSION, 0.5f);
        BuildAvailabiltyMan.Refresh();
        UnitAvailabilityMan.Refresh();
        MainMenueCont.Unexpand(false);
    }
    public void SetToState(WindowStates windowState)
    {
        switch (windowState)
        {
        case WindowStates.MISSION_SELECT:
            missionDetailsWindow.SetActive(false);
            this.missionDetailsWindow.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
            this.missionDetailsWindow.GetComponent <MissionDetailWindow>().IsOpen = false;
            this.mainMenueController.ActivateDeployUI(false);
            mainMenueController.Unexpand();
            // Reset MissionSelect
            // Reset GeneralMenue
            // Reset SquadMenue
            break;

        case WindowStates.GENERAL_SELECT:
            this.missionDetailsWindow.SetActive(true);
            this.mainMenueController.ActivateDeployUI(false);
            if (!mainMenueController.IsExpanded || mainMenueController.EnabledMenue + 1 != 1)
            {
                this.mainMenueController.ToggleMenue(1);
            }
            // Reset GeneralMenue
            // Reset SquadMenue
            break;

        case WindowStates.SQUAD_SELECT:
            this.missionDetailsWindow.SetActive(false);
            this.missionDetailsWindow.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
            this.missionDetailsWindow.GetComponent <MissionDetailWindow>().IsOpen = false;
            this.mainMenueController.ActivateDeployUI(true);
            if (!mainMenueController.IsExpanded || mainMenueController.EnabledMenue + 1 != 2)
            {
                this.mainMenueController.ToggleMenue(2);
            }
            // Reset SquadMenue
            break;

        default:
            throw new ArgumentOutOfRangeException("windowState", windowState, null);
        }

        aktState = windowState;
    }