예제 #1
0
        public static IList GetTestScrollData(int count = 30)
        {
            List <object> test = new List <object>();

            Util.For(count, (i) => test.Add(new object()));
            return(test);
        }
예제 #2
0
        public virtual void Use()
        {
            if (SurfaceMgr != null)
            {
                SurfaceMgr.CurSurface = this;
            }
            var renders = GetRenderers();

            if (renders != null && UsedMaterials != null)
            {
                for (int i = 0; i < renders.Length; ++i)
                {
                    GetMaterials(renders[i], out Material[] materials);
                    if (materials != null && materials.Length > 0)
                    {
                        int        count          = materials.Length;
                        Material[] matArray       = new Material[count];
                        Material[] matSourceArray = new Material[count];
                        for (int j = 0; j < materials.Length; ++j)
                        {
                            matArray[j]       = GetUsedMaterial(materials[j].shader);//UsedMaterials[materials[j].shader];
                            matSourceArray[j] = materials[j];
                        }
                        renders[i].materials = matArray;
                        Util.For(count, (index) => {
                            CopyProp(matSourceArray[index], matArray[index]);
                        });
                    }
                }
            }
        }