home *** CD-ROM | disk | FTP | other *** search
- global gPattern, gFishCaught, gSpriteCaught, gFishFollowingBait, gPlayOnce, gNumFishCaught, gScore, gRemaindingTime, pLaunchHook
-
- on prepareMovie
- gNumFishCaught = 0
- member("FishesDisplay").text = "0"
- member("ScoreDisplay").text = "0"
- gPlayOnce = 1
- gFishFollowingBait = 0
- gFishCaught = 0
- gPattern = [point(92, 74), point(13, 34), point(13, 77), point(15, 87), point(18, 97), point(24, 106), point(29, 112), point(38, 119), point(54, 128), point(74, 134), point(98, 137), point(149, 137), point(167, 134), point(188, 130), point(99, 25), point(75, 10), point(28, 3), point(218, 3), point(230, 5), point(235, 8), point(215, 56), point(212, 72), point(217, 96), point(227, 109), point(232, 116), point(233, 127), point(232, 145), point(226, 148), point(216, 150), point(198, 145), point(178, 128), point(167, 123), point(149, 119), point(130, 119), point(116, 121), point(106, 124), point(98, 130), point(80, 141), point(46, 140), point(38, 134), point(34, 124), point(36, 114), point(42, 108), point(61, 103), point(198, 52), point(205, 46), point(210, 35), point(206, 14), point(202, 10), point(195, 7), point(149, 6), point(89, 10), point(50, 20), point(35, 32), point(30, 38), point(22, 49), point(20, 81), point(30, 99), point(72, 117), point(143, 109), point(184, 98), point(205, 69), point(215, 29), point(210, 21), point(200, 16), point(164, 14), point(136, 16), point(118, 20), point(105, 29), point(92, 61), point(89, 49), point(110, 76), point(145, 91), point(174, 143), point(4, 13), point(232, 73)]
- gRemaindingTime = 120
- displayTime()
- end
-
- on getAngle loc1, loc2
- deltaX = loc2[1] - loc1[1]
- deltaY = -1 * (loc2[2] - loc1[2])
- if deltaY = 0 then
- if deltaX > 0 then
- return 0
- end if
- if deltaX < 0 then
- return 180
- end if
- end if
- if deltaX = 0 then
- deltaX = 0.01
- end if
- theAngle = atan(float(deltaY) / float(deltaX))
- theAngle = theAngle * 180 / PI
- if (deltaX < 0) and (deltaY > 0) then
- theAngle = 180 + theAngle
- else
- if (deltaX < 0) and (deltaY < 0) then
- theAngle = 180 + theAngle
- else
- if (deltaX > 0) and (deltaY < 0) then
- theAngle = 360 + theAngle
- end if
- end if
- end if
- theAngle = theAngle - 90
- if theAngle < 0 then
- theAngle = 360 + theAngle
- end if
- return theAngle
- end
-
- on getDistance point1, point2
- point1X = point1[1]
- point1Y = point1[2]
- point2X = point2[1]
- point2Y = point2[2]
- distance1 = float(abs(point1X - point2X))
- distance2 = float(abs(point1Y - point2Y))
- hypo = sqrt((distance1 * distance1) + (distance2 * distance2))
- return hypo
- end
-
- on displayTime
- if (gRemaindingTime / 60) < 10 then
- timeCount = "0" & string(integer(gRemaindingTime / 60))
- else
- timeCount = string(integer(gRemaindingTime / 60))
- end if
- if (gRemaindingTime mod 60) < 10 then
- timeCount = timeCount && ":" && "0" & string(gRemaindingTime mod 60)
- else
- timeCount = timeCount && ":" && string(gRemaindingTime mod 60)
- end if
- member("GameTime").text = timeCount
- end
-