Exemple #1
0
        void onLoadModel(object obj, object[] param)
        {
            if (obj == null)
            {
                return;
            }
            GameObject gobj   = GameObject.Instantiate(obj as GameObject);
            string     fxname = param[0] as string;

            fxPool.AddPrefab(fxname, gobj);
            List <ShowItem> items;

            if (toShowItems.TryGetValue(fxname, out items))
            {
                for (int i = 0; i < items.Count; i++)
                {
                    ShowItem   item = items[i];
                    GameObject fx   = fxPool.Spawn(fxname);
                    BindTarget(fx, item.target);
                }
                toShowItems.Remove(fxname);
            }
        }
Exemple #2
0
        void onLoadFx(object obj, object[] param)
        {
            GameObject gobj = obj as GameObject;

            if (gobj == null)
            {
                return;
            }
            string fxname = param[0] as string;

            fxPool.AddPrefab(fxname, gobj);
            List <ShowItem> items;

            if (toShowItems.TryGetValue(fxname, out items))
            {
                for (int i = 0; i < items.Count; i++)
                {
                    ShowItem   item = items[i];
                    GameObject fx   = fxPool.Spawn(fxname);
                    BindFx(fx, item.target, item.info);
                }
                toShowItems.Remove(fxname);
            }
        }