-- specialisation for Grimme Multitrailer, using controlI3DAnim script
--
-- by upsidedown 08.10.2014

GrimmeAnimationControl = {}

function GrimmeAnimationControl.prerequisitesPresent(specializations)
  return SpecializationUtil.hasSpecialization(Fillable, specializations)
end
function GrimmeAnimationControl:load(xmlFile)
    
end


function GrimmeAnimationControl:delete()

end

function GrimmeAnimationControl:onDetach()

end;


function GrimmeAnimationControl:mouseEvent(posX, posY, isDown, isUp, button)
end

function GrimmeAnimationControl:keyEvent(unicode, sym, modifier, isDown)
end

function GrimmeAnimationControl:update(dt)

end

function GrimmeAnimationControl:updateTick(dt)
	if self.isServer then
		if self.fillLevel > 8000 then
			self:setI3DAnimState(1,false,false);
			self:setI3DAnimState(2,false,false);	
		end;		
	end;
	
	if self.isClient then
		for i = 1,2,1 do			
			local anim=self.i3danims[i];
			if self.fillLevel > 8000 then			
				anim.inside = false;
				
			else			
				anim.inside = true;
			end;
		end;
	end;
end


function GrimmeAnimationControl:draw()

end



function GrimmeAnimationControl:readStream(streamId, connection)
 
end
function GrimmeAnimationControl:writeStream(streamId, connection)

end
