function OrangeBoomy_process( inst, key )
	if math.abs( inst.x - inst.target[1] ) < inst.size and math.abs( inst.y - inst.target[2] ) < inst.size then
		OrangeBoomy_destroy( inst.x, inst.y )
		delete( enemies, key )
	end
end

function OrangeBoomy_destroy(x, y)
	CreateExplosion( x, y )
	for i=1,12 do
		CreateSineBullet( x, y, 2, RGB(249, 279, 0), i * math.pi / 6 )
	end
end

function CreateOrangeBoomy( x, y, target )
	local angle = math.atan2( (target[2] - y), (target[1] - x) )
	local spr = CreateSprite( "sprite2", x, y )
	SetObjAnim( spr, 8, false )
	local vel = { math.cos( angle ), math.sin( angle ) }
	table.insert( enemies,
				{
					sprite = spr,
					x = x,
					y = y,
					size = 16,
					speed = 1,
					target = target,
					score = 300,
					vel = vel,
					process = OrangeBoomy_process,
					destroy = OrangeBoomy_destroy
				})
end
