Exemple #1
0
    public void end_process()
    {
        set_block_unclickabable_array();
        if (game_manager.is_game_over())
        {
            return;
        }
        if (target.target_number == sum.the_sum && !has_important())
        {
            lifes_score.calculate_score(combo.count); stage.increment_stage();
        }

        if (target.target_number != sum.the_sum || has_important())
        {
            audio.clip = for_decrement;
            damage_on();
            Invoke("damage_off", 0.2f);
        }
        else
        {
            audio.clip = for_generate;
            play_particle();
            if (all_clicked())
            {
                perfect.SetActive(true); Invoke("perfect_off", 0.5f);
            }
            else
            {
                nice.SetActive(true); Invoke("nice_off", 0.5f);
            }
        }
        blocks_movement();
        blocks_special();
        combo.reset_combo();
        timer.reset_timer();
        target.generate_target_number();
        sum.reset_the_sum();
        audio.Play();
        Invoke("set_block_clickabable_array", end_buffer_time);
    }