コード例 #1
0
 public void Hitwall(SplitterParticle particle)
 {
     if (particle.startpos.X + particle.particleradius > 1.0 || particle.startpos.X + particle.particleradius < 0.0) //If ball bounces <---->
     {
         particle.setparticleVelocityX();
     }
     if (particle.startpos.Y + particle.particleradius > 1.0 || particle.startpos.Y + particle.particleradius < 0.0) //If ball bounces ^ v
     {
         particle.setparticleVelocityY();
     }
 }
コード例 #2
0
 public void Hitwall(SplitterParticle particle)
 {
     if (particle.startpos.X + particle.particleradius > 1.0 || particle.startpos.X + particle.particleradius < 0.0) //If ball bounces <---->
     {
         particle.setparticleVelocityX();
     }
     if (particle.startpos.Y + particle.particleradius > 1.0 || particle.startpos.Y + particle.particleradius < 0.0) //If ball bounces ^ v
     {
         particle.setparticleVelocityY();
     }
 }