
Light_Basic = Entity:createSubClass();
registerSpawn("Light_Basic");

function Light_Basic:init()

   self:setTexture("lightblobs1.tga");
   self:setSpriteFrame(0, 0, 64, 64);
   self:setSpriteScale(8);
   self:setIsLight(true);

   self:setFullbright(true);
   self:setLayer(2);

end

function Light_Basic:save()
   return {};
end

function Light_Basic:initFromSave(saveData)
end


function Light_Basic:update()

   local target = self:getLinkTarget();

   if target and not(target == "") then

      local ent = entitiesByName[target];

      if ent then
         self:setPos(ent:getPos());
      else
         self:die();
      end

   end
end

