示例#1
0
        static void PrepareResultGameObject(SpriteCutterGameObject resultGameObject, RendererParametersRepresentation tempParameters,
                                            SideCutData cutData)
        {
            resultGameObject.AssignMeshFilter(cutData.cuttedMesh);
            resultGameObject.AssignMeshRendererFrom(tempParameters);

            if (cutData.cuttedCollidersRepresentations != null)
            {
                resultGameObject.BuildCollidersFrom(cutData.cuttedCollidersRepresentations);
            }
        }
示例#2
0
        static void PrepareResultGameObject(SpriteCutterGameObject resultGameObject, RendererParametersRepresentation tempParameters,
                                            Mesh mesh, List <PolygonColliderParametersRepresentation> colliderRepresentations)
        {
            resultGameObject.AssignMeshFilter(mesh);
            resultGameObject.AssignMeshRendererFrom(tempParameters);

            if (colliderRepresentations != null)
            {
                resultGameObject.BuildCollidersFrom(colliderRepresentations);
            }
        }
示例#3
0
        static void PrepareResultGameObject(SpriteCutterGameObject resultGameObject, SpriteRenderer spriteRenderer,
                                            MeshRenderer meshRenderer, SideCutData cutData)
        {
            resultGameObject.AssignMeshFilter(cutData.cuttedMesh);
            if (spriteRenderer != null)
            {
                resultGameObject.AssignMeshRendererFrom(spriteRenderer);
            }
            else
            {
                resultGameObject.AssignMeshRendererFrom(meshRenderer);
            }

            if (cutData.cuttedCollidersRepresentations != null)
            {
                resultGameObject.BuildCollidersFrom(cutData.cuttedCollidersRepresentations);
            }
        }
        static void PrepareResultGameObject( SpriteCutterGameObject resultGameObject, RendererParametersRepresentation tempParameters,
		                                     SideCutData cutData )
        {
            resultGameObject.AssignMeshFilter( cutData.cuttedMesh );
            resultGameObject.AssignMeshRendererFrom( tempParameters );

            if ( cutData.cuttedCollidersRepresentations != null ) {
                resultGameObject.BuildCollidersFrom( cutData.cuttedCollidersRepresentations );
            }
        }
        static void PrepareResultGameObject( SpriteCutterGameObject resultGameObject, SpriteRenderer spriteRenderer,
		                                     MeshRenderer meshRenderer, SideCutData cutData )
        {
            resultGameObject.AssignMeshFilter( cutData.cuttedMesh );
            if ( spriteRenderer != null ) {
                resultGameObject.AssignMeshRendererFrom( spriteRenderer );
            } else {
                resultGameObject.AssignMeshRendererFrom( meshRenderer );
            }

            if ( cutData.cuttedCollidersRepresentations != null ) {
                resultGameObject.BuildCollidersFrom( cutData.cuttedCollidersRepresentations );
            }
        }