Пример #1
0
        public RecordedFrame(PlaygroundParticlesC playgroundParticles, float keyframeInterval)
        {
            particles = new PlaybackParticle[playgroundParticles.particleCache.Length];
            for (int i = 0; i < particles.Length; i++)
            {
                particles[i] = new PlaybackParticle(
                    playgroundParticles.playgroundCache.position[i],
                    playgroundParticles.playgroundCache.velocity[i],
                    playgroundParticles.playgroundCache.rotation[i],
                    playgroundParticles.playgroundCache.size[i],
                    playgroundParticles.particleCache[i].lifetime,
                    playgroundParticles.particleCache[i].startLifetime,
                    playgroundParticles.playgroundCache.life[i],
                    playgroundParticles.playgroundCache.birth[i],
                    playgroundParticles.playgroundCache.death[i],
                    playgroundParticles.playgroundCache.lifetimeSubtraction[i],
                    playgroundParticles.playgroundCache.color[i],

                    playgroundParticles.playgroundCache.targetPosition[i],
                    playgroundParticles.playgroundCache.initialSize[i]
                    );
            }
            timeStamp             = Time.realtimeSinceStartup;
            this.keyframeInterval = keyframeInterval;
        }
Пример #2
0
		public PlaybackParticle[] CloneAsPlaybackParticles ()
		{
			PlaybackParticle[] recordedParticles = new PlaybackParticle[serializedParticles.Length];
			for (int i = 0; i<serializedParticles.Length; i++)
				recordedParticles[i] = serializedParticles[i].CloneAsPlaybackParticle();
			return recordedParticles;
		}
Пример #3
0
 public PlaybackParticle[] CloneAsPlaybackParticles()
 {
     PlaybackParticle[] recordedParticles = new PlaybackParticle[serializedParticles.Length];
     for (int i = 0; i < serializedParticles.Length; i++)
     {
         recordedParticles[i] = serializedParticles[i].CloneAsPlaybackParticle();
     }
     return(recordedParticles);
 }
Пример #4
0
		public PlaybackParticle CloneAsPlaybackParticle ()
		{
			PlaybackParticle particle = new PlaybackParticle(
				position,
				velocity,
				rotation,
				size,
				lifetime,
				startLifetime,
				playgroundLife,
				playgroundStartLifetime,
				playgroundEndLifetime,
				playgroundLifetimeSubtraction,
				color,
				
				sourcePosition,
				startingSize
				);
			return particle;
		}
Пример #5
0
        public PlaybackParticle Clone()
        {
            PlaybackParticle particle = new PlaybackParticle(
                position,
                velocity,
                rotation,
                size,
                lifetime,
                startLifetime,
                playgroundLife,
                playgroundStartLifetime,
                playgroundEndLifetime,
                playgroundLifetimeSubtraction,
                color,

                sourcePosition,
                startingSize
                );

            return(particle);
        }
Пример #6
0
		public RecordedFrame (PlaygroundParticlesC playgroundParticles, float keyframeInterval) {
			particles = new PlaybackParticle[playgroundParticles.particleCache.Length];
			for (int i = 0; i<particles.Length; i++)
			{
				particles[i] = new PlaybackParticle(
					playgroundParticles.playgroundCache.position[i],
					playgroundParticles.playgroundCache.velocity[i],
					playgroundParticles.playgroundCache.rotation[i],
					playgroundParticles.playgroundCache.size[i],
					playgroundParticles.particleCache[i].lifetime,
					playgroundParticles.particleCache[i].startLifetime,
					playgroundParticles.playgroundCache.life[i],
					playgroundParticles.playgroundCache.birth[i],
					playgroundParticles.playgroundCache.death[i],
					playgroundParticles.playgroundCache.lifetimeSubtraction[i],
					playgroundParticles.playgroundCache.color[i],
					
					playgroundParticles.playgroundCache.targetPosition[i],
					playgroundParticles.playgroundCache.initialSize[i]
					);
			}
			timeStamp = Time.realtimeSinceStartup;
			this.keyframeInterval = keyframeInterval;
		}