Игра по типу Вопро-ответ(Миллионер)...не получается сделать счётчик вопросов...нужно прицепить 2 подсказки и в конце сделать статистику(набранное кол-во очков)....( raphics 800,600,0,2
SetBuffer BackBuffer()
HidePointer
backgroundimage = LoadImage("56.png")
mouseimage = LoadImage("mouseimage.png")
fntArial=LoadFont("Arial",24,False,False,False)
SetFont fntArial
Global a=0, b=0
filein = ReadFile("question.txt")
Read0$ = ReadLine( filein )
Read1$ = ReadLine( filein )
Read2$ = ReadLine$( filein )
Read3$ = ReadLine$( filein )
Read4$ = ReadLine$( filein )
ReadN$ = ReadLine( filein )
CloseFile( filein )
While Not KeyDown(1)
Cls
DrawImage backgroundimage, 0, 0
If a>0 Then a=a-1
If b>0 Then b=b-1
If a>0 Then
Color 250,240,130 : Text 340,0, "Правильно!"
End If
If b>0 Then
Color 255,10,10 : Text 340,0, "Не правильно!"
End If
Color 255,255,255
Text 12,300, Read0$
Color 50,200,50
Rect 10,330,350,30
Color 240,240,240
Rect 11,331,349,29
Color 20,20,20
Text 12,332, "1. "+Read1$
Color 50,200,50
Rect 10,400,350,30
Color 240,240,240
Rect 11,401,349,29
Color 20,20,20
Text 12,402, "2. "+Read2$
Color 50,200,50
Rect 400,330,350,30
Color 240,240,240
Rect 401,331,349,29
Color 20,20,20
Text 402,332, "3. "+Read3$
Color 50,200,50
Rect 400,400,350,30
Color 240,240,240
Rect 401,401,349,29
Color 20,20,20
Text 402,402, "4. "+Read4$
If MouseHit(1) Then
If RectsOverlap (10,330,350,30,MouseX() ,MouseY(),15,15) Then
If ReadN$="1" Then
a=20
Else
b=20
End If
End If
If RectsOverlap (10,400,350,30,MouseX() ,MouseY(),15,15) Then
If ReadN$="2" Then
a=20
Else
b=20
End If
End If
If RectsOverlap (400,330,350,30,MouseX() ,MouseY(),15,15) Then
If ReadN$="3" Then
a=20
Else
b=20
End If
End If
If RectsOverlap (400,400,350,30,MouseX() ,MouseY(),15,15) Then
If ReadN$="4" Then
a=20
Else
b=20
End If
End If
End If
Color 255,255,255
Text 0,2, "MouseX: " + MouseX()
Text 0,18, "MouseY: " + MouseY()
DrawImage mouseimage,MouseX(),MouseY()
Delay 20
Flip
Wend