home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / Japan / Panasonic- / funcity / paris / wave / SH_E.dcr / 00001.ls next >
Encoding:
Text File  |  2017-09-21  |  2.8 KB  |  130 lines

  1. global gc, gh20, gh21, gv20, gv21, gch20, gch21, gscore, gpana
  2.  
  3. on initialize
  4.   set gscore to 0
  5.   set gch20 to 0
  6.   set gch21 to 0
  7.   set gpana to 0
  8.   saraset20()
  9. end
  10.  
  11. on saraset20
  12.   set gch20 to gch20 + 1
  13.   set the puppet of sprite 20 to 1
  14.   set the visible of sprite 20 to 1
  15.   set gc to 0
  16.   set gh20 to random(150) * -1
  17.   set gv20 to random(190) + 40
  18. end
  19.  
  20. on saraset21
  21.   set gch21 to gch21 + 1
  22.   set the puppet of sprite 21 to 1
  23.   set the visible of sprite 21 to 1
  24.   set gc to 0
  25.   set gh21 to random(500) * -1
  26.   set gv21 to random(200) + 40
  27. end
  28.  
  29. on saramove20
  30.   if gh20 > 500 then
  31.     saraset20()
  32.   else
  33.     set gc to (gc + 1) mod 4
  34.     set the castNum of sprite 20 to the number of cast "sara" + gc
  35.     set gh20 to gh20 + random(4) + 30
  36.     set gv20 to gv20 + random(4) - 5
  37.     set the locH of sprite 20 to gh20
  38.     set the locV of sprite 20 to gv20
  39.     updateStage()
  40.   end if
  41. end
  42.  
  43. on saramove21
  44.   if gh21 > 500 then
  45.     saraset21()
  46.   else
  47.     set gc to (gc + 1) mod 4
  48.     set the castNum of sprite 21 to the number of cast "sara" + gc
  49.     set gh21 to gh21 + random(8) + 30
  50.     set gv21 to gv21 + random(40) - 20
  51.     set the locH of sprite 21 to gh21
  52.     set the locV of sprite 21 to gv21
  53.     updateStage()
  54.   end if
  55. end
  56.  
  57. on wait t
  58.   startTimer()
  59.   repeat while the timer <= t
  60.     nothing()
  61.   end repeat
  62. end
  63.  
  64. on sarashoot20
  65.   if sprite 20 intersects 24 and the mouseDown then
  66.     repeat with n = 6 to 10
  67.       set the castNum of sprite 20 to n
  68.       updateStage()
  69.     end repeat
  70.     set the visible of sprite 20 to 0
  71.     set gv20 to -100
  72.     set gscore to gscore + 1
  73.     tokuten()
  74.   end if
  75. end
  76.  
  77. on sarashoot21
  78.   if sprite 21 intersects 24 and the mouseDown then
  79.     repeat with n = 6 to 10
  80.       set the castNum of sprite 21 to n
  81.       updateStage()
  82.     end repeat
  83.     set the visible of sprite 21 to 0
  84.     set gv21 to -100
  85.     set gscore to gscore + 1
  86.     tokuten()
  87.   end if
  88. end
  89.  
  90. on tokuten
  91.   global ghitoketa, gfutaketa
  92.   if gscore < 10 then
  93.     put 0 & gscore into field "tensu"
  94.   else
  95.     put gscore into field "tensu"
  96.   end if
  97.   puppetSprite(2, 1)
  98.   puppetSprite(3, 1)
  99.   set ghitoketa to char 1 of field "tensu"
  100.   set gfutaketa to char 2 of field "tensu"
  101.   set the castNum of sprite 3 to ghitoketa + 100
  102.   set the castNum of sprite 2 to gfutaketa + 100
  103.   updateStage()
  104. end
  105.  
  106. on appeared
  107.   global ahitoketa, afutaketa
  108.   if (gch20 + gch21) < 10 then
  109.     put 0 & gch20 + gch21 into field "appeared"
  110.   else
  111.     put gch20 + gch21 into field "appeared"
  112.   end if
  113.   puppetSprite(4, 1)
  114.   puppetSprite(5, 1)
  115.   set ahitoketa to char 1 of field "appeared"
  116.   set afutaketa to char 2 of field "appeared"
  117.   set the castNum of sprite 5 to ahitoketa + 100
  118.   set the castNum of sprite 4 to afutaketa + 100
  119.   updateStage()
  120. end
  121.  
  122. on mouseMotion
  123.   puppetSprite(24, 1)
  124.   if the mouseDown = 0 then
  125.     set the locH of sprite 24 to the mouseH
  126.     set the locV of sprite 24 to the mouseV - 8
  127.     updateStage()
  128.   end if
  129. end
  130.