// Start is called before the first frame update
        //It gets all the unity objects needed on this script, makes the menu invisible
        //Get an instance of the server connection
        //set the button events
        void Start()
        {
            inviteButton.enabled = false;

            GameObject mainMenuWindow = GameObject.Find("MainMenuWindow");

            mainMenuLogic = mainMenuWindow.GetComponent <MainMenuLogic>();
            GameObject loginWindow = GameObject.Find("LoginWindow");

            loginLogic    = loginWindow.GetComponent <LoginLogic>();
            levelAnimator = gameCreationCanvas.GetComponent <Animator>();
            gameCreationCanvas.enabled = false;
            mainMenuButton.onClick.AddListener(MainMenuClick);
            changeLevelButton.onClick.AddListener(ChangeLevelButtonClick);
            playButton.onClick.AddListener(PlayButtonClick);
            inviteButton.onClick.AddListener(InviteButtonClick);
            serverConnection = ServerConnection.getInstance();


            pythonBtn.onClick.AddListener(PythonClick);
            pythonAnimator = pythonCanvas.GetComponent <Animator>();

            matlabBtn.onClick.AddListener(MatlabClick);
            matlabAnimator = matlabCanvas.GetComponent <Animator>();
        }
예제 #2
0
        // Start is called before the first frame update
        void Start()
        {
            GameObject mainMenuWindow = GameObject.Find("MainMenuWindow");

            mainMenuLogic    = mainMenuWindow.GetComponent <MainMenuLogic>();
            LoginWindow      = GameObject.Find("LoginWindow");
            loginLogic       = LoginWindow.GetComponent <LoginLogic>();
            serverConnection = ServerConnection.getInstance();

            informationCanvas.enabled = false;

            loadEmail.onClick.AddListener(EmailLoadOnClick);
            loadAge.onClick.AddListener(AgeLoadOnClick);
            modifySpam.onClick.AddListener(SpamModifyOnClick);
            mainMenuBtn.onClick.AddListener(MainMenuClick);
        }
        // Start is called before the first frame update
        //It gets all the unity objects needed on this script, makes the menu invisible
        //Get an instance of the server connection
        //set the button events
        void Start()
        {
            scoreBoardCanvas.enabled = false;
            serverConnection         = ServerConnection.getInstance();

            GameObject mainMenuWindow = GameObject.Find("MainMenuWindow");

            mainMenuLogic = mainMenuWindow.GetComponent <MainMenuLogic>();
            mainMenuButton.onClick.AddListener(MainMenuClick);

            GameObject personalBoardWindow = GameObject.Find("PersonalBoardWindow");

            personalBoardLogic = personalBoardWindow.GetComponent <PersonalBoardLogic>();
            personalBoardButton.onClick.AddListener(MyStatsClick);
            searchButton.onClick.AddListener(SearchDatesClick);
            myGames.onValueChanged.AddListener(MyGamesClick);
        }