Ejemplo n.º 1
0
		/// <summary>
		/// Returns a copy of this ParticleProjectionC object.
		/// </summary>
		public ParticleProjectionC Clone () {
			ParticleProjectionC particleProjection 	= new ParticleProjectionC();
			if (sourceColors!=null)
				particleProjection.sourceColors		= (Color32[])sourceColors.Clone ();
			if (sourcePositions!=null)
				particleProjection.sourcePositions	= (Vector3[])sourcePositions.Clone ();
			if (targetPositions!=null)
				particleProjection.targetPositions	= (Vector3[])targetPositions.Clone ();
			if (targetNormals!=null)
				particleProjection.targetNormals	= (Vector3[])targetNormals.Clone ();
			if (hasProjected!=null)
				particleProjection.hasProjected		= (bool[])hasProjected.Clone ();
			if (targetParents!=null)
				particleProjection.targetParents	= (Transform[])targetParents.Clone ();
			particleProjection.projectionTexture	= projectionTexture;
			particleProjection.projectionOrigin		= projectionOrigin;
			particleProjection.projectionTransform	= projectionTransform;
			particleProjection.projectionMatrix		= projectionMatrix;
			particleProjection.projectionPosition	= projectionPosition;
			particleProjection.projectionDirection	= projectionDirection;
			particleProjection.projectionRotation	= projectionRotation;
			particleProjection.projectionDistance	= projectionDistance;
			particleProjection.projectionScale		= projectionScale;
			particleProjection.projectionMask		= projectionMask;
			particleProjection.collisionType		= collisionType;
			particleProjection.minDepth				= minDepth;
			particleProjection.maxDepth				= maxDepth;
			particleProjection.surfaceOffset		= surfaceOffset;
			particleProjection.liveUpdate			= liveUpdate;
			particleProjection.hasRefreshed			= hasRefreshed;
			particleProjection.initialized			= initialized;
			particleProjection.colorLength			= colorLength;
			particleProjection.positionLength		= positionLength;
			return particleProjection;
		}
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new ParticleProjection object.
 /// </summary>
 /// <returns>The projection object.</returns>
 /// <param name="playgroundParticles">Playground particles.</param>
 public static ParticleProjectionC NewProjectionObject(PlaygroundParticlesC playgroundParticles)
 {
     ParticleProjectionC projectionObject = new ParticleProjectionC();
     playgroundParticles.projection = projectionObject;
     playgroundParticles.projection.Initialize();
     return projectionObject;
 }