class 'p03_l06_flicker_light'(Script)

function p03_l06_flicker_light:__init()super()
 self.animator01=anims()
 self.animator02=anims()

 self.arrObject01={}
 self.arrObject02={}

 self.arrParams01={}
 self.arrParams02={}
end

function p03_l06_flicker_light:on_attach()
 local scene=self:scene()

  self.arrObject01[1]=scene:object('light')
  for j=1,4 do
   self.arrObject02[j]= scene:object('light0'..j+1)
  end




 --self.arrObject01[2]=scene:object('pyramidsideright') digits_blue; digits_green; digits_red

-- self.arrObject02[1]=scene:object('lightings_back')
-- self.arrObject02[2]=scene:object('lightings_front')



 for i=1,#self.arrObject01 do
 self.arrParams01[i]={timeGrow=0.5,timeReductionMax=0.2,timeIdle=0.5,timeReductionMin=0.2,
                    start_timeGrow=1,start_timeReductionMax=0.2,start_timeIdle=1,start_timeReductionMin=0.2,
                    time=0,minAlpha=0.2,maxAlpha=0.55,alpha=0,startAlpha=0.2}
 end

 for j=1,#self.arrObject02 do
   self.arrParams02[j]={timeGrow=1,timeReductionMax=0.2,timeIdle=1,timeReductionMin=0.2,
                     start_timeGrow=2,start_timeReductionMax=0.2,start_timeIdle=2,start_timeReductionMin=0.2,
                     time=0,minAlpha=0.5,maxAlpha=1,alpha=0,startAlpha=0.5}
end



 self.animator01:setsParamsFicker(self.arrObject01,self.arrParams01)
  self.animator02:setsParamsFicker(self.arrObject02,self.arrParams02)
end

function p03_l06_flicker_light:on_update(dt)
  self.animator01:update(dt)
  self.animator02:update(dt)
end