-
Notifications
You must be signed in to change notification settings - Fork 1
/
intro.bmx
52 lines (44 loc) · 1.27 KB
/
intro.bmx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Function intro()
Local oldMilli# = MilliSecs()
Local introfade#,introfadespeed#,introTimer# = 18
Repeat
Cls
timePass = (MilliSecs() - oldMilli#)/1000
oldMilli = MilliSecs()
introTimer:- timePass
'control what to draw/section of intro we're in
SetAlpha introfade
If introTimer>15
introfadespeed = .3
SetScale 3,3
DrawText "WickWorks present",SWIDTH/2-200,SHEIGHT/2
ElseIf introTimer>10.5
introfadespeed = -.3
SetScale 3,3
DrawText "WickWorks present",SWIDTH/2-200,SHEIGHT/2
ElseIf introTimer>4
introfadespeed = .15
SetScale 10,10
DrawText "RUBICON",SWIDTH/2-400,SHEIGHT/2-200
Else
introfadespeed = -.3
SetScale 10,10
DrawText "RUBICON",SWIDTH/2-400,SHEIGHT/2-200
EndIf
If introTimer <= 0 Then Exit
introfade:+ (introfadespeed * timePass)
If introfade>1 Then introfade=1
If introfade<0 Then introfade=0
'update the particles
For Local p:MenuParticle = EachIn menuParticleList
p.draw
p.update(1.5)
Next
If KeyHit(KEY_ESCAPE) Or KeyHit(KEY_SPACE) Or MouseHit(MOUSE_LEFT) Or JoyHit(JOY_FIREPRIMARY) Or JoyHit(JOY_MENU) Then Exit
If AppTerminate() Then endGame()
timePass:* 1000'updatemusic uses this form of passing the time
updateMusic()
Flip
Forever
'Until introTimer <= 0
EndFunction