ok thanks Erel, something funny is going on. Old versions of my programs work but newly compiled ones dont. Nor do they respond to touch on the Emulator either.
Could someone try this and see if it recognises screen taps?
Oh and can someone remind me of the character I had to type first to insert the code properly in a forum post? Ta
Sub Process_Globals
End Sub
Sub Globals
Dim h,gap, thrust As Float
Dim canvas1 As Canvas
End Sub
Sub Activity_Create(FirstTime As Boolean)
canvas1.Initialize(Activity)
canvas1.drawline(0,97%y,100%x,97%y,Colors.DarkGray,3%y)
h=8%y
thrust=0
gap=2%y
For n=0 To 10000
h=h+thrust
thrust=thrust+(gap/120)
canvas1.DrawLine(45%x,h,55%x,h,Colors.Yellow,4%Y)
If h>97%Y Then crash
DoEvents
Activity.Invalidate
canvas1.DrawLine(45%x,h,55%x,h,Colors.Black,4%Y)
Next
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Activity_Touch (Action As Int, X As Float, Y As Float)
thrust=thrust-gap
End Sub
Sub crash
If thrust <gap Then canvas1.DrawText("Landed",200dip,200dip,Typeface.DEFAULT_BOLD,30,Colors.Blue,"LEFT")
If thrust >=gap Then canvas1.DrawText("CRASH",200dip,200dip,Typeface.DEFAULT_BOLD,30,Colors.Blue,"LEFT")
h=8%y
thrust=0
End Sub