示例#1
0
    void Start()
    {
        about_mode   = GameObject.Find("Canvas").GetComponent <UI_Touch>();
        check_unlock = GameObject.Find("Canvas").GetComponent <State_Bar>();

        //menu dot
        menu01_dot_all  = GameObject.Find("menu01_page_dot");
        menu01_dot_y[0] = GameObject.Find("page_number1_y");
        menu01_dot_y[1] = GameObject.Find("page_number2_y");
        menu01_dot_y[1].SetActive(false);

        menu_category[0] = GameObject.Find("store_first");
        menu_category[1] = GameObject.Find("store_second");
        menu_category[2] = GameObject.Find("store_third");

        menu_left_arrow  = GameObject.Find("arrow_left");
        menu_right_arrow = GameObject.Find("arrow_right");

        //카테고리
        furniture_menu[0] = GameObject.Find("furniture_menu_01");
        furniture_menu[1] = GameObject.Find("furniture_menu_02");
        furniture_menu[2] = GameObject.Find("furniture_menu_03");

        //카테고리1 가구
        menu_category1_obj[0] = GameObject.Find("place_object");
        menu_category1_obj[1] = GameObject.Find("place_object2");
        //카테고리2 가구
        menu_category2_obj[0] = GameObject.Find("splace_object");
        menu_category2_obj[1] = GameObject.Find("splace_object2");
        //카테고리3 가구
        menu_category3_obj[0] = GameObject.Find("tplace_object");
        menu_category3_obj[1] = GameObject.Find("tplace_object2");

        //카테고리1 페이지
        menu_category1_page[0] = GameObject.Find("page1");
        menu_category1_page[1] = GameObject.Find("page2");
        menu_category1_page[1].SetActive(false);
        //카테고리2 페이지
        menu_category2_page[0] = GameObject.Find("spage1");
        menu_category2_page[1] = GameObject.Find("spage2");
        menu_category2_page[0].SetActive(false);
        menu_category2_page[1].SetActive(false);
        //카테고리3 페이지
        menu_category3_page[0] = GameObject.Find("tpage1");
        menu_category3_page[1] = GameObject.Find("tpage2");
        menu_category3_page[0].SetActive(false);
        menu_category3_page[1].SetActive(false);

        //카테고리1 페이지 잠금
        place_menu_01_page[0] = GameObject.Find("place_menu_page1_lock");
        place_menu_01_page[1] = GameObject.Find("place_menu_page2_lock");
        //place_menu_01_page[1].SetActive(false);
        //카테고리2 페이지 잠금
        place_menu_02_page[0] = GameObject.Find("splace_menu_page1_lock");
        place_menu_02_page[1] = GameObject.Find("splace_menu_page2_lock");
        //place_menu_02_page[0].SetActive(false);
        place_menu_02_page[1].SetActive(false);
        //카테고리2 페이지 잠금
        place_menu_03_page[0] = GameObject.Find("tplace_menu_page1_lock");
        place_menu_03_page[1] = GameObject.Find("tplace_menu_page2_lock");
        //place_menu_03_page[0].SetActive(false);
        place_menu_03_page[1].SetActive(false);
    }
示例#2
0
    void Start()
    {
        about_money = GameObject.Find("Canvas").GetComponent <State_Bar>();

        eat = GameObject.Find("food_silder").GetComponent <Slider>();

        //배고픔
        if (PlayerPrefs.HasKey("state_my_eat"))
        {
            eat.value = PlayerPrefs.GetFloat("state_my_eat");
        }
        //한번도 실행시킨적 없으면 0.5f로 초기화
        else
        {
            eat.value = 0.5f;
        }

        food_buy_done_sound = GameObject.Find("food_buy_done_sound");
        food_buy_fail_sound = GameObject.Find("food_buy_fail_sound");

        food_text = GameObject.Find("food_img_txt");
        food_text.SetActive(false);

        food_left_arrow  = GameObject.Find("food_arrow_left");
        food_right_arrow = GameObject.Find("food_arrow_right");
        food_left_arrow.SetActive(false);
        food_right_arrow.SetActive(false);

        for (int i = 0; i < 5; i++)
        {
            food_image[i] = GameObject.Find("food_img_" + string.Format("{0:D2}", i));
            food_image[i].SetActive(false);

            //음식갯수 초기화
            if (!PlayerPrefs.HasKey("food_number_" + string.Format("{0:D2}", i)))
            {
                food_object_number[i] = 3;
            }
            else
            {
                food_object_number[i] = PlayerPrefs.GetInt("food_number_" + string.Format("{0:D2}", i));
            }

            //음식가격
            food_image_price[i] = GameObject.Find("food_" + string.Format("{0:D2}", i) + "_price");
            food_image_price[i].SetActive(false);
        }

        food_object[0] = GameObject.Find("ChickenLeg");
        food_object[1] = GameObject.Find("Cheese");
        food_object[2] = GameObject.Find("Croissant");
        food_object[3] = GameObject.Find("Fish");
        food_object[4] = GameObject.Find("Meat");


        uit    = GameObject.Find("Canvas").GetComponent <UI_Touch>();
        dino_m = GameObject.Find("Dino").GetComponent <Dino_Making>();

        dino_object = GameObject.Find("Dino");
        Dino        = GameObject.Find("Dino").GetComponent <Animator>();

        food_buy_ui = GameObject.Find("food_buy_things");
        food_buy_ui.SetActive(false);
        for (int i = 0; i < 10; i++)
        {
            food_buy_number[i] = GameObject.Find("food_buy_number_" + string.Format("{0:D2}", i));
            food_buy_number[i].SetActive(false);
        }
        food_buy_particle = GameObject.Find("food_buy_boom");
        food_buy_particle.GetComponent <ParticleSystem>().Stop();
        food_buy_particle.GetComponent <AudioSource>().Stop();
    }