home *** CD-ROM | disk | FTP | other *** search
/ Mind Games (Tessera) / MindGames.iso / mind_games / Files / differences.dxr / Internal_2_EnterFrameScript.ls < prev    next >
Encoding:
Text File  |  2002-11-22  |  1.3 KB  |  59 lines

  1. global gTime_spr, gxronos, gtimeFlag, gLepta, gxronos_flag, gKrataTime, gPoints, gExtraTime, gWrongClick_flag, gTelos_flag, gTimeLimit, gMaxTime, gIsPaused_flag, gLevelsVisibility_flag, perase, gMiaw_flag, gPauseAllowed, thequit
  2.  
  3. on enterFrame me
  4.   changeTime(me, gTimeLimit)
  5.   checkIfEndTime(me, gTimeLimit)
  6.   time_Flag = gxronos mod 2
  7.   if time_Flag = 1 then
  8.     if perase = 1 then
  9.       initShowPoints()
  10.       perase = 0
  11.     end if
  12.   else
  13.     perase = 1
  14.   end if
  15. end
  16.  
  17. on exitFrame
  18.   gLevelsVisibility_flag = 0
  19.   CheckSound()
  20.   if thequit then
  21.     go(1, "exitMov")
  22.   end if
  23.   go(the frame)
  24. end
  25.  
  26. on initShowPoints
  27.   gPoints = gPoints - 10
  28.   member("PointsText").text = string(gPoints)
  29. end
  30.  
  31. on checkIfEndTime me, timeLimit
  32.   if gxronos <= timeLimit then
  33.     gxronos = timeLimit
  34.     telos()
  35.   end if
  36. end
  37.  
  38. on changeTime me, timeLimit
  39.   if not gMiaw_flag and (gTelos_flag = 0) then
  40.     gPauseAllowed = 1
  41.     if gxronos_flag = 1 then
  42.       startTimer()
  43.       gxronos_flag = 0
  44.     end if
  45.     if sprite(gTime_spr).visible = 0 then
  46.       gtimeFlag = 0
  47.       gLepta = 0
  48.     else
  49.       gxronos = gMaxTime - (the timer / 60) - gKrataTime - gExtraTime
  50.     end if
  51.     if gxronos >= 0 then
  52.       sprite(gTime_spr).member.text = string(gxronos)
  53.     else
  54.       sprite(gTime_spr).member.text = "0"
  55.     end if
  56.     updateStage()
  57.   end if
  58. end
  59.