Ejemplo n.º 1
0
    void Give_the_stuff()
    {
        Debug.Log("Give_the_stuff: " + give_this_selected);
        switch (give_this_selected)
        {
        case give_this.virtual_money:
            my_game_master.current_virtual_money[my_game_master.current_profile_selected] += quantity;

            //if (my_game_master.reward_feedback_after_ad)
            //my_feedback_window.Start_me(my_ico,quantity,my_game_master.virtual_money_name);
            break;

        case give_this.new_live:
            my_game_master.current_lives[my_game_master.current_profile_selected] += quantity;

            //if (my_game_master.reward_feedback_after_ad)
            //my_feedback_window.Start_me(my_ico,quantity,my_game_master.lives_name);
            break;

        case give_this.unlock_world:
            my_game_master.Unlock_this_world(quantity);
            my_game_master.world_purchased[my_game_master.current_profile_selected][quantity] = true;
            my_manage_menu_uGUI.Update_profile_name(true);                    //this update also world and stage screen to show the new world unlock
            break;

        case give_this.continue_token:
            my_game_master.current_continue_tokens[my_game_master.current_profile_selected] += quantity;
            break;

        case give_this.incremental_item:
            my_game_master.incremental_item_current_level[my_game_master.current_profile_selected][my_item_ID]++;
            break;

        case give_this.consumable_item:
            my_game_master.consumable_item_current_quantity[my_game_master.current_profile_selected][my_item_ID]++;
            break;
        }

        my_game_master.Save(my_game_master.current_profile_selected);

        if (my_game_master.show_purchase_feedback)
        {
            my_feedback_window.Start_me(my_ico, quantity, my_name);
        }

        my_store_tabs.Update_buttons_in_windows();
        purchased = true;
    }