-- energy door
dofile("scripts/entities/entityinclude.lua")

function init(me)
	setupEntity(me, "")
	entity_initSkeletal(me, "Erulian")
	entity_setActivationType(me, AT_NONE)
	entity_setWidth(me, 512)
	entity_setHeight(me, 512)
	
	entity_scale(me, 0.75, 0.75)
	
	bone_setSegs(entity_getBoneByName(me, "Head"), 20, 4, 0.1, 0.1, -0.001, -0.018, 5, 1)
	bone_setSegs(entity_getBoneByName(me, "Body"), 20, 4, 0.1, 0.1, -0.001, -0.018, 5, 1)
	bone_setSegs(entity_getBoneByName(me, "Ear"), 20, 4, 0.1, 0.1, -0.001, -0.018, 5, 1)
	bone_setSegs(entity_getBoneByName(me, "Arm"), 20, 4, 0.1, 0.1, -0.001, -0.018, 5, 1)
	bone_setSegs(entity_getBoneByName(me, "Leg"), 20, 4, 0.1, 0.1, -0.001, -0.018, 5, 1)
	
	entity_setState(me, STATE_IDLE)
	entity_alpha(me, 0.0001)
	--[[
	entity_alpha(me, 0.5)
	entity_alpha(me, 1, 10, -1, 1)
	]]--
	entity_setSpiritFreeze(me, false)
	
	bone_alpha(entity_getBoneByName(me, "Glow"), 0)
end

function setWarpSceneNode(scene, node)
	sceneName = scene
	nodeName = node
end

function update(me, dt)
	if isForm(FORM_SPIRIT) then
		--entity_say(me, "...naija...")
	end
end

function enterState(me)
	if entity_isState(me, STATE_IDLE) then
		entity_animate(me, "idle", LOOP_INF)
	end
end

function exitState(me)
end

function hitSurface(me)
end
