Go to the documentation of this file.00001 '''
00002 Anoria (c) Gsk 2010
00003 '''
00004
00005 import BigWorld
00006 import GUI
00007 import Math
00008
00009 import Anoria
00010 from Actor import Actor
00011 from Helpers import TargetCaps
00012
00013
00014 from AvatarModel import AvatarModelManager as AMM
00015
00016 class Corpse(BigWorld.Entity, Actor):
00017
00018 def __init__(self):
00019 BigWorld.Entity.__init__(self)
00020 Actor.__init__(self)
00021
00022
00023
00024
00025
00026 ''' def prerequisites( self ):
00027 # Make sure our model is loaded asynchronously before putting us
00028 # into the world.
00029 return [ self.modelName ] '''
00030
00031 def onEnterWorld( self, prereqs ):
00032
00033
00034
00035
00036
00037
00038 self.targetCaps = [ TargetCaps.CAP_CAN_HIT ]
00039
00040
00041
00042 if self.modelNumber >= 0:
00043 nm = AMM.makeModel( self.modelNumber, self.model )
00044 self.model = nm
00045 else:
00046 self.model = BigWorld.Model( self.modelName )
00047
00048
00049 self.setupActionMatcher()
00050 self.am.entityCollision = 0
00051 self.am.collisionRooted = 0
00052
00053
00054 BigWorld.addShadowEntity( self )
00055
00056
00057
00058 self.filter = BigWorld.AvatarDropFilter()
00059
00060 BigWorld.callback(1.0, self.playDead)
00061
00062
00063 def playDead(self):
00064 next = self.model.Dead
00065 self.model.Die(0, next, 1)
00066
00067 def onLeaveWorld( self ):
00068
00069
00070
00071
00072 BigWorld.delShadowEntity(self)
00073 self.model = None
00074
00075
00076
00077
00078
00079
00080