home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 1.5)
-
- import Bladex
- import Reference
- siseoacido = Bladex.CreateSound('..\\..\\Sounds\\muerte-acida.wav', 'SiseoAcido')
- siseoacido.Volume = 0.7
- siseoacido.Scale = 1.14
- siseoacido.MinDistance = 5000
- siseoacido.MaxDistance = 45000
-
- def TakeMe2Init(EntityName):
- me = Bladex.GetEntity(EntityName)
- me.LaunchAnmType('Rlx')
- pos = me.InitPos
- me.Position = (pos[0], pos[1], pos[2])
-
-
- class LAVA_AREA:
- entity_name = ''
- entity_damaged = ''
- zoom = 0.1
- texture_name = 'LAVA'
- particle_type = 'LargeFire'
-
- def FuegoInLavaPlayer(self, obj_name, time):
- fuego = Bladex.GetEntity(obj_name)
- char = Bladex.GetEntity(self.entity_damaged)
- fuego.Position = (char.Position[0], char.Position[1], char.Position[2])
-
-
- def LaunchFireInLava(self, entity_name, entity_damaged):
- self.entity_damaged = entity_damaged
- self.entity_name = entity_name
- char = Bladex.GetEntity(entity_damaged)
- siseoacido.Play(char.Position[0], char.Position[1], char.Position[2])
- pfuego = Bladex.CreateEntity(entity_name + '_prtcls', 'Entity Particle System D1', char.Position[0], char.Position[1] + 1000, char.Position[2])
- pfuego.ParticleType = self.particle_type
- pfuego.YGravity = 0.0
- pfuego.Friction = 0.05
- pfuego.PPS = 128
- pfuego.Velocity = (0.0, -1500.0, 0.0)
- pfuego.RandomVelocity = 25.0
- pfuego.Time2Live = 16
- pfuego.FrameFunc = self.FuegoInLavaPlayer
- pfuego.SubscribeToList('Frame')
-
-
- def LavaDefTouchFunc(self, entity_name, entity_damaged, factor):
- self.entity_damaged = entity_damaged
- player = Bladex.GetEntity(entity_damaged)
- if player.Life > 0:
- player.Life = player.Life - factor * 3
-
- if player.Life <= 0:
- player.Wuea = Reference.WUEA_ENDED
- player.LaunchAnmType('dth_burn')
- player.AnmEndedFunc = TakeMe2Init
-
- my_fire = Bladex.GetEntity(entity_name + '_prtcls')
- if not my_fire:
- self.LaunchFireInLava(entity_name, entity_damaged)
- my_fire = Bladex.GetEntity(entity_name + '_prtcls')
-
- my_fire.DeathTime = Bladex.GetTime() + 0.2
-
-
- def CreateLava(self, entity_name, x, y, z, texture = 'LAVA', zoom = 0.1, particle_type = 'LargeFire'):
- self.entity_name = entity_name
- self.texture_name = texture
- self.zoom = zoom
- self.particle_type = particle_type
- tmp_lava = Bladex.CreateEntity(entity_name, 'Entity Lava', x, y, z)
- tmp_lava.TextureName = texture
- tmp_lava.Zoom = zoom
- tmp_lava.TouchFluidFunc = self.LavaDefTouchFunc
-
-
- def __getstate__(self):
- print 'LAVA_AREA.__getstate__()'
- return (1, self.entity_name, self.entity_damaged, self.zoom, self.texture_name, self.particle_type)
-
-
- def __setstate__(self, parm):
- print 'LAVA_AREA.__setstate__()'
- if parm[0] == 1:
- self.entity_name = parm[1]
- self.entity_damaged = parm[2]
- self.zoom = parm[3]
- self.texture_name = parm[4]
- self.particle_type = parm[5]
- if self.entity_name:
- my_ent = Bladex.GetEntity(self.entity_name)
- my_ent.TouchFluidFunc = self.LavaDefTouchFunc
-
- else:
- print 'DinObj.__setstate__() -> Version mismatch'
- self.entity_name = ''
- self.entity_damaged = ''
- self.zoom = 0.1
- self.texture_name = 'LAVA'
- self.particle_type = 'LargeFire'
-
-
-