home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 56 / CDPowerplay56Disc2.iso / demos / blade / data1.cab / Program_Executable_Files / Lib / Stars.py < prev    next >
Encoding:
Text File  |  2000-10-27  |  1.3 KB  |  52 lines

  1. ###############################################
  2. ####                 MAGIC                 ####
  3. ###############################################
  4. import Bladex
  5. import netgame
  6.  
  7.  
  8. Bladex.ReadAlphaBitMap("..\\..\\Data\\Estrellita.bmp","Estrellita")
  9.  
  10. # LucesCools y duendes
  11. Bladex.AddParticleGType("LucesCools","Estrellita",1,16)
  12. for i in range(16):
  13.     Tetha = 8-abs(i-8)
  14.     r=255.0
  15.     g=255.0
  16.     b=255.0
  17.     a   = (Tetha*255)/9
  18.     size= Tetha*20
  19.     Bladex.SetParticleGVal("LucesCools",i,r,g,b,a,size)
  20.  
  21. def DeTwinkle(ObjName):
  22.     if netgame.GetNetState() == 0:
  23.         import GameText
  24.         import Select
  25.  
  26.         wps=Bladex.GetEntity(ObjName+" TwinkleStar")
  27.         if wps:
  28.             import ScorerWidgets
  29.             wps.DeathTime=Bladex.GetTime()
  30.             GameText.WriteTextAux(Select.GetSelectionData(ObjName)[2],5,255,255,255,[])
  31.             ScorerWidgets.ObjSlTimer = Bladex.GetTime()
  32.             Bladex.GetEntity(ObjName).SelfIlum = 0
  33.  
  34.  
  35. def Twinkle(ObjName):
  36.     if netgame.GetNetState() == 0:
  37.         wps=Bladex.CreateEntity(ObjName+" TwinkleStar", "Entity Particle System Dobj", 0.0, 0.0, 0.0)
  38.         wps.ObjectName=ObjName
  39.         wps.ParticleType="LucesCools"
  40.         wps.Time2Live=16
  41.         wps.RandomVelocity=0
  42.         wps.Velocity=0,0,0
  43.         wps.NormalVelocity=2
  44.         wps.YGravity=0
  45.         wps.PPS=5
  46.         Bladex.GetEntity(ObjName).SelfIlum = -1
  47.         return wps
  48.     
  49. # Stars.Twinkle(char.InvLeft)
  50. # Stars.Twinkle(char.InvRight)
  51.  
  52. AutoTake = 1