Exemplo n.º 1
0
    void Start()
    {
        exitGameController = GetComponentInParent <ExitGameController>();

        button = GetComponent <Button>();
        button.onClick.AddListener(new UnityAction(() => exitGameController.ExitToTitleScreen()));
    }
    void Start()
    {
        exitPanel        = gameObject.transform.GetComponentInChildren <ExitGameController>();
        mainMenu         = gameObject.transform.GetComponentInChildren <MainController>();
        selectModePanel  = gameObject.transform.GetComponentInChildren <SelectModeController>();
        selectLevelPanel = gameObject.transform.GetComponentInChildren <SelectLevelController>();
        addLevels        = gameObject.transform.GetComponentInChildren <DebugAddingLevelsController>();
        settings         = gameObject.transform.GetComponentInChildren <SettingsController>();
        stats            = gameObject.transform.GetComponentInChildren <StatisticsController>();

        mainMenu.setActive(true);
        exitPanel.setActive(false);
        selectModePanel.setActive(false);
        selectLevelPanel.setActive(false);
        addLevels.setActive(false);
        settings.setActive(false);
        stats.setActive(false);
    }
Exemplo n.º 3
0
	void Start () 
    {
        exitPanel = gameObject.transform.GetComponentInChildren<ExitGameController>();
        mainMenu = gameObject.transform.GetComponentInChildren<MainController>();
        selectModePanel = gameObject.transform.GetComponentInChildren<SelectModeController>();
        selectLevelPanel = gameObject.transform.GetComponentInChildren<SelectLevelController>();
        addLevels = gameObject.transform.GetComponentInChildren<DebugAddingLevelsController>();
        settings = gameObject.transform.GetComponentInChildren<SettingsController>();
        stats = gameObject.transform.GetComponentInChildren<StatisticsController>();

        mainMenu.setActive(true);
        exitPanel.setActive(false);
        selectModePanel.setActive(false);
        selectLevelPanel.setActive(false);
        addLevels.setActive(false);
        settings.setActive(false);
        stats.setActive(false);
	}