private VisualParticle[] GenerateVisualParticles(GravityParticle[] particles) { if (visualParticles != null) { foreach (var visualParticle in visualParticles) { if (visualParticle) { Destroy(visualParticle.gameObject); } } } var result = new VisualParticle[particles.Length]; for (int i = 0; i < result.Length; i++) { result[i] = Instantiate( VisualParticlePrefab, particles[i].position, Quaternion.identity, transform); } return(result); }
/** Rotate the textures of eacht entity. */ public void _rotateTexture(VisualParticle particle, Mogre.Entity entity) { if (particle == null) { throw new ArgumentNullException("particle cannot be null!"); } if (entity == null) { throw new ArgumentNullException("entity cannot be null!"); } EntityRenderer__rotateTexture(nativePtr, particle.nativePtr, (IntPtr)entity.NativePtr); }