From a353c408ee252f54d4c1dcd3f86b7ebbbbf1d474 Mon Sep 17 00:00:00 2001 From: Mark Mine Date: Fri, 29 Jun 2001 18:14:36 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/interval/ActorInterval.py | 4 ++-- direct/src/interval/SoundInterval.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/direct/src/interval/ActorInterval.py b/direct/src/interval/ActorInterval.py index 8592e99166..7629e2831b 100644 --- a/direct/src/interval/ActorInterval.py +++ b/direct/src/interval/ActorInterval.py @@ -61,8 +61,8 @@ class ActorInterval(Interval): # Initialize superclass Interval.__init__(self, name, duration, reverse=reverse) # Update stopEvent + self.stopEvent = id + '_stopEvent' if self.loop: - self.stopEvent = id + '_stopEvent' self.stopEventList = [self.stopEvent] def calcFrame(self, t): @@ -116,7 +116,7 @@ class ActorInterval(Interval): self.goToT(t) # And start loop, restart flag says continue from current frame self.actor.loop(self.animName, restart=0) - self.accept(self.stopEvent, self.actor.stop) + self.acceptOnce(self.stopEvent, self.actor.stop) # Print debug information self.notify.debug( 'updateFunc() - IVAL_INIT %s looping anim' % diff --git a/direct/src/interval/SoundInterval.py b/direct/src/interval/SoundInterval.py index a3cd4c33a0..da2d99ac54 100644 --- a/direct/src/interval/SoundInterval.py +++ b/direct/src/interval/SoundInterval.py @@ -44,10 +44,10 @@ class SoundInterval(Interval): # Initialize superclass Interval.__init__(self, name, duration) # Update stopEvent + self.stopEvent = id + '_stopEvent' if self.wantSound: - self.stopEvent = id + '_stopEvent' self.stopEventList = [self.stopEvent] - + def updateFunc(self, t, event = IVAL_NONE): """ updateFunc(t, event) Go to time t @@ -68,7 +68,8 @@ class SoundInterval(Interval): # Start sound AudioManager.play(self.sound, t, self.loop) # Accept event to kill sound - self.accept(self.stopEvent, lambda s = self: AudioManager.stop(s.sound)) + self.acceptOnce(self.stopEvent, + lambda s = self: AudioManager.stop(s.sound)) # Print debug information self.notify.debug('updateFunc() - %s: t = %f' % (self.name, t))