-- ================================================================================================
-- Energy God
-- ================================================================================================

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

naija = getNaija()

function init(me)	
	setupBasicEntity(
	me,
	"",					-- texture
	30,								-- health
	1,								-- manaballamount
	1,								-- exp
	1,								-- money
	0,								-- collideRadius (only used if hit entities is on)
	STATE_IDLE,						-- initState
	1024,								-- sprite width
	1024,								-- sprite height
	1,								-- particle "explosion" type, maps to particleEffects.txt -1 = none
	0,								-- 0/1 hit other entities off/on (uses collideRadius)
	4000,							-- updateCull -1: disabled, default: 4000
	1
	)
	entity_initSkeletal(me, "EnergyGod")
	entity_setCull(me, false)
	--entity_setTouchPush(me, 1)	
	--entity_flipHorizontal(me)
	--entity_setCollideWithAvatar(me, true)

	entity_setName(me, "EnergyGod")
	entity_setState(me, STATE_IDLE)	
	--entity_generateCollisionMask(me)
end

function update(me, dt)

--[[
	bone = entity_collideSkeletalVsCircle(me, getNaija())
	if bone ~= 0 or entity_x(naija) < entity_x(me) then
		entity_push(getNaija(), 1200, 0, 1)
	end
	]]--
	
	if entity_x(naija) < entity_x(me) and entity_x(naija) > entity_x(me) - 256 then
		entity_push(getNaija(), 1200, 0, 1)
	end
end

function damage(me, attacker, bone, damageType, dmg)
	
end

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

function exitState(me)
end

function activate(me)
end

function hitSurface(me)
end

