Exemple #1
0
    // Use this for initialization
    void Start()
    {
        my_options      = options_screen.GetComponent <options_menu>();
        normal_emoticon = perfect_target.sprite;

        if (game_master.game_master_obj)
        {
            my_game_master = (game_master)game_master.game_master_obj.GetComponent("game_master");
            my_game_master.my_ads_master.my_game_uGUI = this;
        }

        if (my_game_master)
        {
            //set ads gui
            my_game_master.my_ads_master.Initiate_ads();
            my_game_master.my_ads_master.my_feedback_window = my_feedback_window;
            my_game_master.my_ads_master.my_gift_manager    = my_gift_manager;
            my_gift_manager.my_game_master = my_game_master;

            //star score
            if (!ignore_game_master_preferences)
            {
                show_star_score   = my_game_master.show_star_score;
                show_progress_bar = my_game_master.show_progres_bar;
                //int score
                show_int_score = my_game_master.show_int_score;
            }
            show_stage_record = my_game_master.show_int_score_stage_record_in_game_stage;


            if (my_game_master.score_name != "")
            {
                int_score_ico.GetComponent <Text>().text = my_game_master.score_name;
            }

            if (!ignore_game_master_preferences)
            {
                show_debug_messages = my_game_master.show_debug_messages;
                show_debug_warnings = my_game_master.show_debug_warnings;
            }

            my_game_master.latest_stage_played_world[my_game_master.current_profile_selected] = n_world;
            my_game_master.latest_stage_played_stage[my_game_master.current_profile_selected] = n_stage;


            my_game_master.current_world[my_game_master.current_profile_selected] = n_world - 1;
        }
        else
        {
            temp_score_name = win_screen_int_score_title.text;
            if (show_debug_warnings)
            {
                Debug.LogWarning("In order to allow saves and play music and menu sfx, you must star from Home scene and open this stage using the in game menu");
            }
        }

        //star score
        if (show_star_score)
        {
            star_container.SetActive(true);
        }
        else
        {
            show_star_count = false;
            star_container.SetActive(false);
        }
        if (show_progress_bar)
        {
            my_progress_bar.Start_me(this);
            my_progress_bar.gameObject.SetActive(true);
        }
        else
        {
            my_progress_bar.gameObject.SetActive(false);
        }

        //int score
        if (show_int_score)
        {
            int_score_ico.SetActive(true);
        }
        else
        {
            int_score_ico.SetActive(false);
        }

        Reset_me();
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        my_options       = options_screen.GetComponent <options_menu>();
        lives_timer_text = lives_timer.transform.GetChild(0).GetComponent <TextMeshProUGUI>();


        if (game_master.game_master_obj)
        {
            my_game_master = (game_master)game_master.game_master_obj.GetComponent("game_master");
            my_game_master.my_ads_master.my_game_uGUI = this;
        }

        if (my_game_master)
        {
            //set ads gui
            my_game_master.my_ads_master.Initiate_ads();
            my_game_master.my_ads_master.my_feedback_window = my_feedback_window;
            my_game_master.my_ads_master.my_gift_manager    = my_gift_manager;
            my_gift_manager.my_game_master = my_game_master;

            //star score
            if (!ignore_game_master_preferences)
            {
                show_star_score   = my_game_master.show_star_score;
                show_progress_bar = my_game_master.show_progres_bar;
                //int score
                show_int_score = my_game_master.show_int_score;
            }
            show_stage_record = my_game_master.show_int_score_stage_record_in_game_stage;


            if (my_game_master.score_name != "")
            {
                int_score_ico.GetComponent <TextMeshProUGUI>().text = my_game_master.score_name;
            }

            if (!ignore_game_master_preferences)
            {
                show_debug_messages = my_game_master.show_debug_messages;
                show_debug_warnings = my_game_master.show_debug_warnings;
            }

            if (my_game_master.use_same_scene_for_all_stages_in_the_same_world)
            {
                n_stage = my_game_master.current_stage;
            }

            my_game_master.latest_stage_played_world[my_game_master.current_profile_selected] = n_world;
            my_game_master.latest_stage_played_stage[my_game_master.current_profile_selected] = n_stage;


            my_game_master.current_world[my_game_master.current_profile_selected] = n_world - 1;
        }
        else
        {
            temp_score_name = win_screen_int_score_title.text;
            if (show_debug_warnings)
            {
                Debug.LogWarning("In order to allow saves and play music and menu sfx, you must star from Home scene and open this stage using the in game menu");
            }
        }

        //star score
        if (total_collectable_stars_in_this_stage == 0)
        {
            total_collectable_stars_in_this_stage = 3; //defalut value
        }
        if (my_game_master && my_game_master.star_score_rule == game_master.Star_score_rule.EachStageHaveHisOwnStarCap)
        {
            my_game_master.stage_stars_cap_score[my_game_master.current_profile_selected][n_world - 1, n_stage - 1] = total_collectable_stars_in_this_stage;
        }

        if (show_star_score)
        {
            winScreenSkin.star_container.SetActive(true);
        }
        else
        {
            show_star_count = false;
            winScreenSkin.star_container.SetActive(false);
        }
        if (show_progress_bar)
        {
            my_progress_bar.Start_me(this);
            my_progress_bar.gameObject.SetActive(true);
        }
        else
        {
            my_progress_bar.gameObject.SetActive(false);
        }

        //int score
        if (show_int_score)
        {
            int_score_ico.SetActive(true);
        }
        else
        {
            int_score_ico.SetActive(false);
        }

        Reset_me();
    }