mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
*** empty log message ***
This commit is contained in:
parent
74c8db2d68
commit
a353c408ee
@ -61,8 +61,8 @@ class ActorInterval(Interval):
|
|||||||
# Initialize superclass
|
# Initialize superclass
|
||||||
Interval.__init__(self, name, duration, reverse=reverse)
|
Interval.__init__(self, name, duration, reverse=reverse)
|
||||||
# Update stopEvent
|
# Update stopEvent
|
||||||
|
self.stopEvent = id + '_stopEvent'
|
||||||
if self.loop:
|
if self.loop:
|
||||||
self.stopEvent = id + '_stopEvent'
|
|
||||||
self.stopEventList = [self.stopEvent]
|
self.stopEventList = [self.stopEvent]
|
||||||
|
|
||||||
def calcFrame(self, t):
|
def calcFrame(self, t):
|
||||||
@ -116,7 +116,7 @@ class ActorInterval(Interval):
|
|||||||
self.goToT(t)
|
self.goToT(t)
|
||||||
# And start loop, restart flag says continue from current frame
|
# And start loop, restart flag says continue from current frame
|
||||||
self.actor.loop(self.animName, restart=0)
|
self.actor.loop(self.animName, restart=0)
|
||||||
self.accept(self.stopEvent, self.actor.stop)
|
self.acceptOnce(self.stopEvent, self.actor.stop)
|
||||||
# Print debug information
|
# Print debug information
|
||||||
self.notify.debug(
|
self.notify.debug(
|
||||||
'updateFunc() - IVAL_INIT %s looping anim' %
|
'updateFunc() - IVAL_INIT %s looping anim' %
|
||||||
|
@ -44,10 +44,10 @@ class SoundInterval(Interval):
|
|||||||
# Initialize superclass
|
# Initialize superclass
|
||||||
Interval.__init__(self, name, duration)
|
Interval.__init__(self, name, duration)
|
||||||
# Update stopEvent
|
# Update stopEvent
|
||||||
|
self.stopEvent = id + '_stopEvent'
|
||||||
if self.wantSound:
|
if self.wantSound:
|
||||||
self.stopEvent = id + '_stopEvent'
|
|
||||||
self.stopEventList = [self.stopEvent]
|
self.stopEventList = [self.stopEvent]
|
||||||
|
|
||||||
def updateFunc(self, t, event = IVAL_NONE):
|
def updateFunc(self, t, event = IVAL_NONE):
|
||||||
""" updateFunc(t, event)
|
""" updateFunc(t, event)
|
||||||
Go to time t
|
Go to time t
|
||||||
@ -68,7 +68,8 @@ class SoundInterval(Interval):
|
|||||||
# Start sound
|
# Start sound
|
||||||
AudioManager.play(self.sound, t, self.loop)
|
AudioManager.play(self.sound, t, self.loop)
|
||||||
# Accept event to kill sound
|
# 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
|
# Print debug information
|
||||||
self.notify.debug('updateFunc() - %s: t = %f' % (self.name, t))
|
self.notify.debug('updateFunc() - %s: t = %f' % (self.name, t))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user