예제 #1
0
파일: World.cs 프로젝트: Nomad1/sharpbox2d
 private void drawParticleSystem(ParticleSystem system)
 {
     bool wireframe = (m_debugDraw.getFlags() & DebugDrawFlags.Wireframe) != 0;
     int particleCount = system.getParticleCount();
     if (particleCount != 0)
     {
         float particleRadius = system.getParticleRadius();
         Vec2[] positionBuffer = system.getParticlePositionBuffer();
         ParticleColor[] colorBuffer = null;
         if (system.m_colorBuffer.data != null)
         {
             colorBuffer = system.getParticleColorBuffer();
         }
         if (wireframe)
         {
             m_debugDraw.drawParticlesWireframe(positionBuffer, particleRadius, colorBuffer,
                 particleCount);
         }
         else
         {
             m_debugDraw.drawParticles(positionBuffer, particleRadius, colorBuffer, particleCount);
         }
     }
 }