Example #1
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);
            }
        }
Example #2
0
        static void PrepareResultGameObject(SpriteCutterGameObject resultGameObject, SpriteRenderer spriteRenderer,
                                            MeshRenderer meshRenderer, Mesh mesh, List <PolygonColliderParametersRepresentation> colliderRepresentations)
        {
            resultGameObject.AssignMeshFilter(mesh);
            if (spriteRenderer != null)
            {
                resultGameObject.AssignMeshRendererFrom(spriteRenderer);
            }
            else
            {
                resultGameObject.AssignMeshRendererFrom(meshRenderer);
            }

            if (colliderRepresentations != null)
            {
                resultGameObject.BuildCollidersFrom(colliderRepresentations);
            }
        }
Example #3
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);
            }
        }
        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 );
            }
        }