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


'Menu
MenuBackImg:TImage = LoadImage("Data\Images\Backgrounds\menu.png")

'Font


 'Sounds
Global LaserSound:TSound = LoadSound("Data\Sounds\Energy_Gloves.wav")
Global LaserSound2:TSound = LoadSound("Data\Sounds\Laser1.wav")

'Music
Global OST_1:TSound = LoadSound("Data\Music\8bp119-01-505-liberation.ogg")
 
Global MusicChannel:TChannel = New TChannel
 
  Global hohoh

Player1_img = LoadImage("Data\Images\BattleShips\Player\PlayerFighter_0.png")
MidHandleImage Player1_img

StarsImg1 = LoadImage("Data\Images\Backgrounds\stars1.png")
					
StarsImg2 = LoadImage("Data\Images\Backgrounds\stars2.png")



'Ammo
BulletImg = LoadImage("Data\Images\Ammo\Bullet.png")

Global GrenadeImg:TImage = LoadImage("Data\Images\Ammo\bomb.png")
Global GreenLaserImg:TImage = LoadImage("Data\Images\Ammo\greenLaserRay.png")
Global RedLaserImg:TImage = LoadImage("Data\Images\Ammo\redLaserRay.png")
Global MissileImg:TImage = LoadImage("Data\Images\Ammo\missile.png")
Global PlasmaImg:TImage = LoadImage("Data\Images\Ammo\Plasma_ball_cosmocurio.png")

'Enemys
Global AsteroidImg_1:TImage = LoadImage("Data\Images\BattleShips\Dominion\asteroid_1.png")
MidHandleImage AsteroidImg_1
Global AsteroidImg_2:TImage = LoadImage("Data\Images\BattleShips\Dominion\asteroid_2.png")
MidHandleImage AsteroidImg_2
Global AsteroidImg_3:TImage = LoadImage("Data\Images\BattleShips\Dominion\asteroid_2.png")
MidHandleImage AsteroidImg_3
Global FighterCImg:TImage = LoadImage("Data\Images\BattleShips\Dominion\Fighter C.png")
Global FighterBImg:TImage = LoadImage("Data\Images\BattleShips\Dominion\Fighter B.png")
Global FighterAImg:TImage = LoadImage("Data\Images\BattleShips\Dominion\Fighter A.png")
Global FighterSImg:TImage = LoadImage("Data\Images\BattleShips\Dominion\Fighter S.png")

Global UFOImg:TImage = LoadImage("Data\Images\BattleShips\Dominion\UFO.png")
MidHandleImage UFOImg

Global RangerImg:TImage = LoadImage("Data\Images\BattleShips\Dominion\Ranger.png")

Global BombCruiserImg:TImage = LoadImage("Data\Images\BattleShips\Dominion\Bomb.png")

Global HAWKImg:TImage = LoadImage("Data\Images\BattleShips\Dominion\HAWK.png")
MidHandleImage HAWKImg 

'Bnuses
Global ArmorBonusImg:TImage = LoadImage("Data\Images\Ammo\hp.png")
Global EnergyBonusImg:TImage = LoadImage("Data\Images\Ammo\energy.png")
Global ArmoryUpBonusImg:TImage = LoadImage("Data\Images\Ammo\Shield_Icon.png")
Global EnergyUpBonusImg:TImage = LoadImage("Data\Images\Ammo\atom_blue.png")
Global WeaponyUpBonusImg:TImage = LoadImage("Data\Images\Ammo\weapon.png")


'Effects
Global BlueExplosionImg:TImage = LoadAnimImage("Data\Images\Effects\BlueExplosion.jpg", 120, 120, 0, 12)
Global RedExplosionImg:TImage = LoadAnimImage("Data\Images\Effects\RedExplosion.jpg", 120, 120, 0, 12)
Global SkybusterExplosion:TImage = LoadAnimImage("Data\Images\Effects\SkybusterExplosion.jpg", 320, 240, 0, 20)
Global ExplosionImg:TImage = LoadAnimImage("Data\Images\Effects\explosion.png", 64, 64, 0, 16)

Type TExplosion Extends TEntity
	Field x, y
	Field img:TImage
	Field animframes, frame
	Field time, maxtime
	
	Function CreateExplosion:TExplosion(x, y, frames, img:TImage, time)
		Local Expl:TExplosion = New TExplosion
		Expl.x = x
		Expl.y = y
		Expl.img = img
		Expl.animframes = frames
		Expl.maxtime = time
		Expl.frame = 0
		Expl.AddLast(SEntities)
	End Function
	
	Method Update()'
		time = time + 1
		If ((time > maxtime) Or (time = maxtime)) Then
			frame = frame + 1
			time = 0
		EndIf
		If (frame > (animframes - 2)) Then
			  Self.remove()
		EndIf
		DrawImage(img, x, y, frame)
	End Method
	
End Type