public static Particle createParticle(ParticleEnum particleType,Vector2 position, float size, Vector2 direction) { Particle particle = new Particle(); particle.data.Position = position; particle.data.Scaling = size; particle.data.direction = direction; return createParticle(particle,particleType); }
public EnumParticle getAudioByEnum(ParticleEnum pEnum) { if (!enumParticleMapping.ContainsKey(pEnum)) { return(null); } return(enumParticleMapping[pEnum]); }
public void playParticle(ParticleEnum inputEnum) { EnumParticle particleObject = SceneMode.instance.getParticleByEnum(inputEnum); Transform particle = particleObject.pTransform; Transform transform = transformMapping[inputEnum].pTransform; if (transformMapping.ContainsKey(inputEnum) && particle != null) { Instantiate(particle, transform.position, transform.rotation); } }
public DataPlot(DataIntermediatePlot dip) { Name = dip.Name; Enums = new ParticleEnum[dip.Enums.Length]; dip.Enums.CopyTo(Enums, 0); Properties = new Property[dip.Properties.Length]; dip.Properties.CopyTo(Properties, 0); Particles = new FinalParticle[dip.Particles.Length]; for (int index = 0; index < dip.Particles.Length; index++) { var p = dip.Particles[index]; Particles[index] = new FinalParticle(p); } }
public EnumParticle getParticleByEnum(ParticleEnum pEnum) { return(particleMapping.getAudioByEnum(pEnum)); }
private static Particle createParticle(Particle particle,ParticleEnum particleType) { if (particleType == ParticleEnum.Smoke) { Smoke smoke = new Smoke(particle.data.Position, particle.data.Scaling, particle.data.direction); smoke.init(null); return smoke; } if (particleType == ParticleEnum.Explosion) { Explosion explosion = new Explosion(particle.data.Position,particle.data.Scaling,particle.data.direction); explosion.init(null); return explosion; } return null; }