dofile("scripts/entities/entityinclude.lua")

orb = 0

function init(me)
	orb = getEntity("EnergyOrb")
	if getFlag(FLAG_DEEPWHALE) > 1 then
		entity_delete(orb)
		orb = 0
	end
end

function update(me, dt)
	if orb ~= 0 and node_isEntityIn(me, orb) then
		setFlag(FLAG_DEEPWHALE, 2)
		orb = 0
	end
end
