예제 #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);
            }
        }
예제 #4
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 );
            }
        }
예제 #5
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 );
            }
        }