Пример #1
0
    public void dispatch(string UiName, string UiScript, Dictionary <string, string> param)
    {
        /*   Dictionary<string, string[]> l = new Dictionary<string, string[]>();
         * string[] d = new string[7];
         * d[0] = "prolo";
         * d[1] = "smic";
         * l.Add("khey", d);
         *
         * print();*/
        if (ActiveUi)
        {
            Destroy(ActiveUi);
        }

        ActiveUi     = Instantiate(UiMap[UiName]) as GameObject;
        ActiveUi.tag = "active";
        ActiveUi.transform.SetParent(gameObject.transform, false);


        BasicController UiController = ActiveUi.GetComponent(UiScript) as BasicController;

        UiController.setParams(param);
        UiController.apply();
        ActiveUi.transform.SetParent(gameObject.transform, false);
    }