Exemplo n.º 1
0
 void OnMouseDown()
 {
     if (!game_uGUI.in_pause)
     {
         my_game_uGUI.Update_lives(live);
     }
 }
Exemplo n.º 2
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.CompareTag("Player") && trigger_on)
        {
            trigger_on = false;
            if (!game_uGUI.stage_end && !game_uGUI.in_pause)
            {
                if (my_game_uGUI.show_debug_messages)
                {
                    Debug.Log("death");
                }

                my_game_uGUI.Update_lives(-1);
                Invoke("Reset_trigger", 0.1f);

                game_uGUI.in_pause = true;
                my_demo_controller.Restart();
                game_uGUI.in_pause = false;
            }
        }
    }
Exemplo n.º 3
0
    /*
     * void Not_have_enough_money()
     *      {
     *
     *      }*/

    void Continue_from()
    {
        this.gameObject.SetActive(false);
        Time.timeScale = initial_time_scale;
        my_game_uGUI.Update_lives(my_game_master.continue_give_new_lives);
        switch (my_game_master.if_player_continue_selected)
        {
        case game_master.if_player_continue.continue_playing_this_stage:
            if (my_game_uGUI.show_debug_messages)
            {
                Debug.Log("continue playing this stage");
            }
            game_uGUI.in_pause         = false;
            game_uGUI.allow_game_input = true;
            if (my_game_master.lose_lives_selected == game_master.lose_lives.when_show_lose_screen)
            {
                my_game_uGUI.retry_button.SetActive(true);
                my_game_uGUI.stage_button.SetActive(true);
            }
            break;

        case game_master.if_player_continue.restart_from_current_world_and_current_stage:
            if (my_game_uGUI.show_debug_messages)
            {
                Debug.Log("restart this stage");
            }
            SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
            break;

        case game_master.if_player_continue.restart_from_current_world_Stage_1:
            if (my_game_uGUI.show_debug_messages)
            {
                Debug.Log("restart_from_current_world_Stage_1");
            }
            break;
        }
    }