Spawner = Actor:createSubClass();
registerSpawn("Spawner");

function Spawner:init()

   Actor.init(self);

   self.spawnCountDown = 0;

end

function Spawner:update()

   Actor.update(self);

   self.spawnCountDown = self.spawnCountDown - 1;

   if self.spawnCountDown <= 0 then
      self.spawnCountDown = 30;

      local spawned = Chaser:create();
      spawned:setPos(self:getPos()); 
      spawned.editorProperties.faction = self.editorProperties.faction;
      spawned:setColor(self:getColor());

   end

end


