Actually the code is here:
http://dpaste.com/86496/

The enemy i can make shoot like that, but the player actually creates
a new bullet on the fly...
I'll have to ponder about that.. thanks for advice though!

On Oct 22, 10:00 pm, Paul <[EMAIL PROTECTED]> wrote:
> I don't know what the current code looks like but you could do something
> like this:
>
> class Bullet:
>    __init__(self):
>       self.shootable = True
>
>    def set_shootable(self, dt):
>       self.shootable = True
>
>    def shoot(self):
>       if not self.shootable: return
>       # shoot
>       self.shootable = False
>       pyglet.clock.schedule_once(bullet.set_shootable, 0.5)
>
> On Wed, Oct 22, 2008 at 6:17 PM, Drozzy <[EMAIL PROTECTED]> wrote:
>
> > I am reprogramming the sample shooter.py that was presented by pyglet
> > developers.
> >http://video.google.co.uk/videoplay?docid=-8788197863800411145
>
> > On of the things I am stuck on is slowing down the firing of the
> > bullets from the player ship.
>
> > What I need to do is:
> > -record the last time the bullet was fired
> > -next time fire (mouse is clicked) is requested, see if enough
> > interval is passed
> > -if not don't shoot else shoot
>
> > Is it ok to use the datetime object for this or does pyglet have some
> > kind of support with the scheduler for this?
>
> > Thank you!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to