Sub Process_Globals
Type kid(id As Int, x As Float, y As Float, width As Float, height As Float, moveDirection As Int, sprites(6) As B4XBitmap, frame As Int)
Private fx As JFX
Private MainForm As Form
Private cnv As B4XCanvas
Private kidsList As List
Private vpW, vpH As Float
Private myTimer As Timer
Private frames As Int
Private kidIndex As Int = 0
Private xui As XUI
Private speed As Float = 3
Private animationSpeed As Float = 6
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
kidsList.Initialize
myTimer.Initialize("myTimer",1000/60)
cnv.Initialize(MainForm.RootPane)
vpW = MainForm.RootPane.Width
vpH = MainForm.RootPane.Height
'create here the girls
kidsList.Add(createGirl(vpW/2,vpH/2,0)) 'run right
' kidsList.Add(createGirl(vpW/2,vpH/2-(vpH*0.3),1)) 'run left
' kidsList.Add(createGirl(vpW/2,vpH/2+(vpH*0.3),1)) 'run left
myTimer.Enabled = True
End Sub