1. Daniel Pope
  2. korovic

Commits

Daniel Pope  committed 2be1dfb

Fix: work around a but in lepton

  • Participants
  • Parent commits 1b4c0bf
  • Branches default

Comments (0)

Files changed (2)

File korovic/world.py

View file
  • Ignore whitespace
             template=Particle(
                 color=(1.0, 1.0, 1.0, 1.0),
             ),
+            rate=100,
+            time_to_live=0.3
         )
         self.splash_group = ParticleGroup(
             controllers=[
                 controller.Movement(),
                 controller.Gravity((0, -900, 0)),
-                controller.Lifetime(max_age=2)
+                controller.Lifetime(max_age=2),
+                e
             ],
             renderer=Renderer(img),
             system=self.particles
         )
-        e.emit(30, self.splash_group)
 
     def load_sprite(self, img):
         if img not in self.images:
     def check_crash(self):
         p = self.squid.position
         if p.y < 0:
+            if self.crashed:
+                return
             self.distance = p.x * 0.1
             self.crashed = True
             self.remove_squid()
             self.splash.play()
-            vx, vy = self.squid.body.velocity * 0.5
+            vx, vy = self.squid.body.velocity * 0.7
             vy = max(20, vy * -1)
             self.particle_splash(p, v(vx, vy))
             self.dispatch_event('on_crash', self.distance)

File setup.py

View file
  • Ignore whitespace
 
 setup(
     name='korovic',
-    version='1.0',
+    version='1.0.1',
     packages=find_packages(),
     description="Dr. Korovic's Flying Atomic Squid",
     long_description=open('README').read(),