// Use this for initialization void Start() { game_variables_container = GameObject.Find("Game_variables"); game_variables_list = game_variables_container.GetComponentInChildren <game_variables_script> (); win_textbox = GameObject.Find("Title_winner").GetComponent <TextMeshProUGUI>(); if (game_variables_list.get_who_win() == 0) { win_textbox.text = game_variables_list.get_player1_name() + " wins !"; } else if (game_variables_list.get_who_win() == 1) { win_textbox.text = game_variables_list.get_player2_name() + " wins !"; } }
// Use this for initialization void Start() { game_variables_container = GameObject.Find("Game_variables"); game_variables_list = game_variables_container.GetComponentInChildren <game_variables_script> (); current_player_id_text = GameObject.Find("current_player_value").GetComponent <TextMeshProUGUI>(); current_player_moves_text = GameObject.Find("moves_value").GetComponent <TextMeshProUGUI>(); current_player_turns_text = GameObject.Find("rotations_value").GetComponent <TextMeshProUGUI>(); current_player_moves_text.text = ""; current_player_turns_text.text = ""; current_player_id_text.text = game_variables_list.get_player1_name(); floor_container = GameObject.Find("board_full"); floor_script_list = floor_container.GetComponentsInChildren <select_script_floor> (); player1_container = GameObject.Find("Player1_pawns"); player1_pawn_script_list = player1_container.GetComponentsInChildren <select_cube_script> (); player2_container = GameObject.Find("Player2_pawns"); player2_pawn_script_list = player2_container.GetComponentsInChildren <select_cube_script> (); }
void Start() { //linking objects to variables game_variables_container = GameObject.Find("Game_variables"); game_variables_list = game_variables_container.GetComponentInChildren <game_variables_script> (); button_new = GameObject.Find("Button_new"); button_new_online = GameObject.Find("Button_new_online"); button_back = GameObject.Find("Button_back"); button_help = GameObject.Find("Button_help"); button_exit = GameObject.Find("Button_exit"); button_credits = GameObject.Find("Button_credits"); button_option = GameObject.Find("Button_option"); rules_view = GameObject.Find("Rules"); option_view = GameObject.Find("Options"); credits_view = GameObject.Find("Credits"); //hiding unused objects button_back.SetActive(false); rules_view.SetActive(false); option_view.SetActive(false); credits_view.SetActive(false); }