'This BMX file was edited with BLIde ( http://www.blide.org )

GameLevel = 0
If (init = 0) Then
	init = 1
	BackGround()
	Player.CreatePlayer(Player1_img, width / 2, height - Player1_img.height)
	TAsteroid.CreateAsteroid(AsteroidImg_1, 100, 0, 10, 3, 5)
	TAsteroid.CreateAsteroid(AsteroidImg_1, 300, 0, 10, 3, 5)
	TAsteroid.CreateAsteroid(AsteroidImg_1, 500, 0, 10, 3, 5)
	
	WeaponSlot1:Weapon = BulletLauncher
End If


If (ChannelPlaying(MusicChannel) = False) Then
	MusicChannel:TChannel = CueSound(OST_1)
	SetChannelVolume(MusicChannel, Music)
	ResumeChannel(MusicChannel)
EndIf

UpdateEntities SEntities 'start update method for all objects in list

If (Rand(1, Abs(3000 - Different)) < 5 And hohoh < 40) Then
	TUFO.CreateUFO(UFOImg, Rand(0, width), -100, WaweLauncher, 2, 10)
EndIf
If (Rand(1, Abs(2000 - Different)) < 5 And hohoh < 40) Then
	TRanger.CreateRanger(RangerImg, Rand(0, width), -100, BulletLauncher, 2, 2)
EndIf




If (Rand(1, Abs(3000 - Different)) = 1 And hohoh < 40) Then
	TFighterV.CreateFighter(FighterCImg, Rand(0, width), -100, BigBulletLauncher, 2, 15)
EndIf
If (Rand(1, Abs(4000 - Different)) = 1 And hohoh < 40) Then
	TFighterV.CreateFighter(FighterBImg, Rand(0, width), -100, IonLaser, 2, 20)
EndIf
If (Rand(1, Abs(6000 - Different)) = 1 And hohoh < 40) Then
	TFighterV.CreateFighter(FighterAImg, Rand(0, width), -100, BigBulletLauncher, 2, 30)
EndIf
If (Rand(1, Abs(9000 - Different)) = 1 And hohoh < 40) Then
	TFighterV.CreateFighter(FighterSImg, Rand(0, width), -100, WaweLauncher, 2, 45)
EndIf


If (Rand(1, Abs(5500 - Different)) = 1 And hohoh < 40) Then
		THAWK.CreateHAWK(HAWKImg, 700, -100, IonLauncher, 2, 30)
EndIf

If (Rand(1, Abs(6500 - Different)) = 1 And hohoh < 40) Then
	TBombCruiser.CreateBombCruiser(HAWKImg, 700, -100, GrenadeLauncher, 2, 30)
EndIf



If (Rand(1, Abs(2000 - Different)) = 1 And hohoh < 40) Then
	TAsteroid.CreateAsteroid(AsteroidImg_1, Rand(0, width), -100, 10, 3, 5)
EndIf
If (Rand(1, Abs(5000 - Different)) = 1 And hohoh < 40) Then
	TAsteroid.CreateAsteroid(AsteroidImg_2, Rand(0, width), -100, 30, 3, 15, 1.5, 1.5)
EndIf
If (Rand(1, Abs(7000 - Different)) = 1 And hohoh < 40) Then
	TAsteroid.CreateAsteroid(AsteroidImg_3, Rand(0, width), -100, 50, 3, 25, 2.5, 2.5)
EndIf


Different = Different + 0.12



If KeyHit(KEY_ESCAPE) Then
	FlushKeys()
	GameLevel = -1
	MenuLevel = 10
	init = 0
	RemoveEntities SEntities
	LocScore = 0
	LocScore = -1020302
End If