Esempio n. 1
0
    void CreateWhenSelectChange(ShipModemType type)
    {
        U3DUtil.DestroyAllChild(MyHead.Table.gameObject);
        List <StaticShipCanvas> l = ShipPlanDC.GetAllShipDesignList(type);

        SortCanvasList(ref l);
        for (int i = 0; i < l.Count; i++)
        {
            StaticShipCanvas Info = l[i];

            GameObject go = NDLoad.LoadWndItem("ShipDesignItem", MyHead.Table.transform);
            if (go != null)
            {
                ShipDesignItem item = go.GetComponent <ShipDesignItem>();
                if (item != null)
                {
                    item.SetData(Info, m_iWndType == WndType.ShipEdit, Info.ShipDesignID);
                    item.m_SelectCallBack = ShipDesignItemCallBack;
                }
            }
        }
        StartCoroutine(RepositionTable(1));
    }