Exemplo n.º 1
0
    private void Creat_object(int object_id)
    {
        GameObject new_object_go = Instantiate(Resources.Load("Prefab/Map/Cell/cell_image", typeof(GameObject))) as GameObject;

        new_object_go.transform.SetParent(main_object.transform);
        object_main = new_object_go.GetComponent <cell_image_script>();

        Coverage_Data base_info = Main.db_data.coverage_data[object_id];

        if (base_info.image_id != 0)
        {
            Image_Data image_info = Main.db_data.image_data[base_info.image_id];

            object_main._image.sprite = Main.Image_list[image_info.image_name];
            object_main._name         = "" + base_info.coverage_name;
            object_main.name          = base_info.coverage_name;

            object_main.Object_resize(image_info._width, image_info._height);

            object_main.Object_position(0, 0);
        }
        else
        {
            object_main._image.sprite = null;

            object_main.Object_resize(0, 0);

            object_main.Object_position(0, 0);

            object_main.main_object.SetActive(false);
        }
    }
Exemplo n.º 2
0
    private void Redisplay_object(Cell_stuffing_Blank object_info)
    {
        Display_level(object_info.level);

        if (object_info.image_id == 0)
        {
            object_main._image.sprite = null;
            object_main.Object_resize(0, 0);
            object_main.Object_position(0, 0);
            object_main.main_object.SetActive(false);
        }
        else
        {
            if (object_main.main_object.activeSelf == false)
            {
                object_main.main_object.SetActive(true);
            }

            if (object_info.id != 0)
            {
                Image_Data image_info = Main.db_data.image_data[object_info.image_id];

                object_main._image.sprite = Main.Image_list[image_info.image_name];
                object_main._name         = "" + object_info.editor_id;
                object_main.name          = object_info.editor_id;

                object_main.Object_resize(image_info._width, image_info._height);

                object_main.Object_position(image_info._x, image_info._y);
            }
            else
            {
                object_main._image.sprite = null;

                object_main.Object_resize(0, 0);

                object_main.Object_position(0, 0);

                object_main.main_object.SetActive(false);
            }
        }

        if (object_info.object_active != 0)
        {
            additional_object.Display_image(object_info.object_image_id);
            additional_gameObject.SetActive(true);
        }
        else
        {
            additional_gameObject.SetActive(false);
        }
    }
Exemplo n.º 3
0
    private void Redisplay_object(int object_id)
    {
        Coverage_Data base_info = Main.db_data.coverage_data[object_id];

        if (base_info.image_id == 0)
        {
            object_main.main_object.SetActive(false);
        }
        else
        {
            if (object_main.main_object.activeSelf == false)
            {
                object_main.main_object.SetActive(true);
            }


            Image_Data image_info = Main.db_data.image_data[base_info.image_id];

            object_main._image.sprite = Main.Image_list[image_info.image_name];
            object_main._name         = "" + base_info.coverage_name;
            object_main.name          = base_info.coverage_name;

            object_main.Object_resize(image_info._width, image_info._height);

            object_main.Object_position(0, 0);
        }
    }
Exemplo n.º 4
0
    private void Redisplay_object(int object_id)
    {
        if (object_id == 0)
        {
            object_main.main_object.SetActive(false);
        }
        else
        {
            Cell_decoration_Data decoration_info = Main.db_data.cell_decoration[object_id];

            if (object_main.main_object.activeSelf == false)
            {
                object_main.main_object.SetActive(true);
            }


            Image_Data image_info = Main.db_data.image_data[decoration_info.image_id];

            object_main._image.sprite = Main.Image_list[image_info.image_name];
            object_main._name         = "" + decoration_info.decoration_name;
            object_main.name          = decoration_info.decoration_name;

            object_main.Object_resize(image_info._width, image_info._height);

            object_main.Object_position(image_info._x, image_info._y);
        }
    }
Exemplo n.º 5
0
    private void Redisplay_object(Cell_stuffing_Blank object_info)
    {
        Display_level(object_info.level);

        if (object_info.image_id == 0)
        {
            object_main.main_object.SetActive(false);
        }
        else
        {
            if (object_main.main_object.activeSelf == false)
            {
                object_main.main_object.SetActive(true);
            }

            if (object_info.id != 0)
            {
                object_main._name = "" + object_info.editor_id;
                object_main.name  = object_info.editor_id;
                Display_image(object_info.image_id);
            }
            else
            {
                object_main._image.sprite = null;

                object_main.Object_resize(0, 0);

                object_main.Object_position(0, 0);

                object_main.main_object.SetActive(false);
            }
        }

        if (object_info.object_active != 0)
        {
            additional_object.Display_image(object_info.object_image_id);
            additional_gameObject.SetActive(true);
        }
        else
        {
            additional_gameObject.SetActive(false);
        }
    }
Exemplo n.º 6
0
    private void Creat_object(Cell_stuffing_Blank object_info)
    {
        GameObject new_object_go = Instantiate(Resources.Load("Prefab/Map/Cell/cell_image", typeof(GameObject))) as GameObject;

        new_object_go.transform.SetParent(main_frame.transform);
        object_main = new_object_go.GetComponent <cell_image_script>();

        Display_level(object_info.level);

        if (object_info.id != 0)
        {
            Image_Data image_info = Main.db_data.image_data[object_info.image_id];

            object_main._image.sprite = Main.Image_list[image_info.image_name];
            object_main._name         = "" + object_info.editor_id;
            object_main.name          = object_info.editor_id;

            object_main.Object_resize(image_info._width, image_info._height);

            object_main.Object_position(image_info._x, image_info._y);
        }
        else
        {
            object_main._image.sprite = null;

            object_main.Object_resize(0, 0);

            object_main.Object_position(0, 0);

            object_main.main_object.SetActive(false);
        }

        if (object_info.object_active != 0)
        {
            additional_object.Display_image(object_info.object_image_id);
            additional_gameObject.SetActive(true);
        }
        else
        {
            additional_gameObject.SetActive(false);
        }
    }