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; }
public PlaybackParticle[] CloneAsPlaybackParticles () { PlaybackParticle[] recordedParticles = new PlaybackParticle[serializedParticles.Length]; for (int i = 0; i<serializedParticles.Length; i++) recordedParticles[i] = serializedParticles[i].CloneAsPlaybackParticle(); return recordedParticles; }
public PlaybackParticle[] CloneAsPlaybackParticles() { PlaybackParticle[] recordedParticles = new PlaybackParticle[serializedParticles.Length]; for (int i = 0; i < serializedParticles.Length; i++) { recordedParticles[i] = serializedParticles[i].CloneAsPlaybackParticle(); } return(recordedParticles); }
public PlaybackParticle CloneAsPlaybackParticle () { PlaybackParticle particle = new PlaybackParticle( position, velocity, rotation, size, lifetime, startLifetime, playgroundLife, playgroundStartLifetime, playgroundEndLifetime, playgroundLifetimeSubtraction, color, sourcePosition, startingSize ); return particle; }
public PlaybackParticle Clone() { PlaybackParticle particle = new PlaybackParticle( position, velocity, rotation, size, lifetime, startLifetime, playgroundLife, playgroundStartLifetime, playgroundEndLifetime, playgroundLifetimeSubtraction, color, sourcePosition, startingSize ); return(particle); }
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; }