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
15f312f2b1
commit
8c60b9d7a2
@ -8,7 +8,8 @@ import DirectNotifyGlobal
|
||||
|
||||
class ActorInterval(Interval):
|
||||
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('ActorInterval')
|
||||
# create ActorInterval DirectNotify category
|
||||
notify = directNotify.newCategory('ActorInterval')
|
||||
|
||||
# Name counter
|
||||
animNum = 1
|
||||
@ -65,7 +66,7 @@ class ActorInterval(Interval):
|
||||
# Pose anim
|
||||
self.actor.pose(self.animName, frame)
|
||||
# Print debug information
|
||||
self.notify.debug('ActorInterval.goToT() - %s pose to frame: %d' %
|
||||
self.notify.debug('goToT() - %s pose to frame: %d' %
|
||||
(self.name,frame))
|
||||
return frame
|
||||
|
||||
@ -85,8 +86,7 @@ class ActorInterval(Interval):
|
||||
self.ignore(self.stopEvent)
|
||||
# Print debug information
|
||||
self.notify.debug(
|
||||
'ActorInterval.updateFunc() - %s stoping at frame: ' %
|
||||
self.name +
|
||||
'updateFunc() - %s stoping at frame: ' % self.name +
|
||||
'%d Num frames: %d' % (frame, self.numFrames))
|
||||
elif self.loop == 1:
|
||||
if event == IVAL_INIT:
|
||||
@ -97,7 +97,7 @@ class ActorInterval(Interval):
|
||||
self.accept(self.stopEvent, self.actor.stop)
|
||||
# Print debug information
|
||||
self.notify.debug(
|
||||
'ActorInterval.updateFunc() - IVAL_INIT %s looping anim' %
|
||||
'updateFunc() - IVAL_INIT %s looping anim' %
|
||||
self.name)
|
||||
else:
|
||||
# Pose anim
|
||||
|
@ -13,6 +13,10 @@ from MessengerGlobal import *
|
||||
class FunctionInterval(Interval):
|
||||
# Name counter
|
||||
functionIntervalNum = 1
|
||||
|
||||
# create FunctionInterval DirectNotify category
|
||||
notify = directNotify.newCategory('FunctionInterval')
|
||||
|
||||
# Class methods
|
||||
def __init__(self, function, name = None, openEnded = 1, extraArgs = []):
|
||||
"""__init__(function, name = None)
|
||||
@ -40,8 +44,7 @@ class FunctionInterval(Interval):
|
||||
apply(self.function, self.extraArgs)
|
||||
# Print debug information
|
||||
self.notify.debug(
|
||||
'FunctionInterval.updateFunc() - %s: executing Function' %
|
||||
self.name)
|
||||
'updateFunc() - %s: executing Function' % self.name)
|
||||
|
||||
### FunctionInterval subclass for throwing events ###
|
||||
class EventInterval(FunctionInterval):
|
||||
|
@ -6,6 +6,8 @@ from PandaModules import *
|
||||
import LerpBlendHelpers
|
||||
|
||||
class LerpInterval(Interval):
|
||||
# create LerpInterval DirectNotify category
|
||||
notify = directNotify.newCategory('LerpInterval')
|
||||
# Class methods
|
||||
def __init__(self, name, duration, functorFunc, blendType='noBlend'):
|
||||
"""__init__(name, duration, functorFunc, blendType)
|
||||
@ -31,8 +33,7 @@ class LerpInterval(Interval):
|
||||
# Evaluate the lerp
|
||||
self.lerp.setT(t)
|
||||
# Print debug information
|
||||
self.notify.debug('LerpInterval.updateFunc() - %s: t = %f' %
|
||||
(self.name, t))
|
||||
self.notify.debug('updateFunc() - %s: t = %f' % (self.name, t))
|
||||
|
||||
def getBlend(self, blendType):
|
||||
"""__getBlend(self, string)
|
||||
@ -252,8 +253,9 @@ class LerpPosHprScaleInterval(LerpInterval):
|
||||
class LerpFunctionInterval(Interval):
|
||||
# Interval counter
|
||||
lerpFunctionIntervalNum = 1
|
||||
# create LerpFunctionInterval DirectNotify category
|
||||
notify = directNotify.newCategory('LerpFunctionInterval')
|
||||
# Class methods
|
||||
|
||||
def __init__(self, function, fromData = 0, toData = 1, duration = 0.0,
|
||||
blendType = 'noBlend', extraArgs = [], name = None):
|
||||
"""__init__(function, duration, fromData, toData, name)
|
||||
@ -289,8 +291,7 @@ class LerpFunctionInterval(Interval):
|
||||
# Evaluate function
|
||||
apply(self.function, [data] + self.extraArgs)
|
||||
# Print debug information
|
||||
self.notify.debug('LerpFunctionInterval.updateFunc() - %s: t = %f' %
|
||||
(self.name, t))
|
||||
self.notify.debug('updateFunc() - %s: t = %f' % (self.name, t))
|
||||
|
||||
def getBlend(self, blendType):
|
||||
"""__getBlend(self, string)
|
||||
|
@ -7,6 +7,8 @@ import Mopath
|
||||
class MopathInterval(Interval):
|
||||
# Name counter
|
||||
mopathNum = 1
|
||||
# create MopathInterval DirectNotify category
|
||||
notify = directNotify.newCategory('MopathInterval')
|
||||
# Class methods
|
||||
def __init__(self, mopath, node, name=None):
|
||||
"""__init__(mopath, node, name)
|
||||
@ -28,6 +30,5 @@ class MopathInterval(Interval):
|
||||
"""
|
||||
self.mopath.goTo(self.node, t)
|
||||
# Print debug information
|
||||
self.notify.debug('MopathInterval.updateFunc() - %s: t = %f' %
|
||||
(self.name, t))
|
||||
self.notify.debug('updateFunc() - %s: t = %f' % (self.name, t))
|
||||
|
||||
|
@ -6,6 +6,8 @@ from Interval import *
|
||||
class SoundInterval(Interval):
|
||||
# Name counter
|
||||
soundNum = 1
|
||||
# create SoundInterval DirectNotify category
|
||||
notify = directNotify.newCategory('SoundInterval')
|
||||
# Class methods
|
||||
# Create a sound interval
|
||||
# If loop = 0, sound will play once, duration of the interval
|
||||
@ -71,8 +73,7 @@ class SoundInterval(Interval):
|
||||
# Accept event to kill sound
|
||||
self.accept(self.stopEvent, lambda s = self: AudioManager.stop(s.sound))
|
||||
# Print debug information
|
||||
self.notify.debug('SoundInterval.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