コード例 #1
0
        public static Mesh GetShadowMesh(float baseWidth, float baseHeight, float tallness)
        {
            int key = HashOf(baseWidth, baseHeight, tallness);

            if (!shadowMeshDict.TryGetValue(key, out var value))
            {
                value = MeshMakerShadows.NewShadowMesh(baseWidth, baseHeight, tallness);
                shadowMeshDict.Add(key, value);
            }
            return(value);
        }
コード例 #2
0
        public static Mesh GetShadowMesh(float baseWidth, float baseHeight, float tallness)
        {
            int  key  = ShadowMeshPool.HashOf(baseWidth, baseHeight, tallness);
            Mesh mesh = default(Mesh);

            if (!ShadowMeshPool.shadowMeshDict.TryGetValue(key, out mesh))
            {
                mesh = MeshMakerShadows.NewShadowMesh(baseWidth, baseHeight, tallness);
                ShadowMeshPool.shadowMeshDict.Add(key, mesh);
            }
            return(mesh);
        }