home *** CD-ROM | disk | FTP | other *** search
- global gpvNumScoreBubbles, gpvScoreBubbleFirstSprite, gNextScoreShow, gScoreShowCount, gScoreShowTimer, gScoreShowY, SCORE_SHOW_RELOAD, SCORE_SHOW_TIMER_OFF, SCORE_SHOW_OFFY, gScoreShowOffy
-
- on moleInitScoreBubblesNewGame firstSprite, numBubbles
- gpvScoreBubbleFirstSprite = firstSprite
- gpvNumScoreBubbles = numBubbles
- gScoreShowCount = []
- gScoreShowTimer = []
- gScoreShowY = []
- gScoreShowOffy = []
- SCORE_SHOW_RELOAD = 3 * 60 / 8
- SCORE_SHOW_TIMER_OFF = 1 * 60 / 10
- SCORE_SHOW_OFFY = -9
- gNextScoreShow = 1
- repeat with i = 1 to gpvNumScoreBubbles
- pvHideScoreBubble(i)
- end repeat
- end
-
- on moleShowScoreBubble x, y, numPoints
- sn = gpvScoreBubbleFirstSprite + (2 * (gNextScoreShow - 1))
- cn = the number of member "ScoreShow1" + gNextScoreShow - 1
- put numPoints into member cn
- sprite(sn + 1).memberNum = cn
- set the loc of sprite sn to point(x, -1000)
- set the loc of sprite (sn + 1) to point(x - 26, -1000)
- gScoreShowCount[gNextScoreShow] = SCORE_SHOW_RELOAD
- gScoreShowTimer[gNextScoreShow] = the timer + SCORE_SHOW_TIMER_OFF
- gScoreShowY[gNextScoreShow] = y
- gScoreShowOffy[gNextScoreShow] = SCORE_SHOW_OFFY
- gNextScoreShow = gNextScoreShow + 1
- if gNextScoreShow > gpvNumScoreBubbles then
- gNextScoreShow = 1
- end if
- end
-
- on moleShowScoreSpecial x, y, castName
- sn = gpvScoreBubbleFirstSprite + (2 * (gNextScoreShow - 1))
- cn = the number of member castName
- sprite(sn + 1).memberNum = cn
- set the loc of sprite sn to point(x, -1000)
- set the loc of sprite (sn + 1) to point(x, -1000)
- sprite(sn + 1).height = member(cn).height
- sprite(sn + 1).width = member(cn).width
- gScoreShowCount[gNextScoreShow] = SCORE_SHOW_RELOAD
- gScoreShowTimer[gNextScoreShow] = the timer + SCORE_SHOW_TIMER_OFF
- gScoreShowY[gNextScoreShow] = y
- gScoreShowOffy[gNextScoreShow] = 0
- gNextScoreShow = gNextScoreShow + 1
- if gNextScoreShow > gpvNumScoreBubbles then
- gNextScoreShow = 1
- end if
- end
-
- on pvHideScoreBubble n
- x = 256
- y = -1000
- sn = gpvScoreBubbleFirstSprite + (2 * (n - 1))
- set the loc of sprite sn to point(x, y)
- set the loc of sprite (sn + 1) to point(x, y)
- gScoreShowCount[n] = 0
- end
-
- on pvUpdateScoreBubbles
- end
-