Commits

Chris Klimas  committed c997bfe

Fix tests

Forgot to update them to use the new timer/tween methods.

  • Participants
  • Parent commits 22bd67f

Comments (0)

Files changed (4)

File tests/recording.lua

 		self.player = Fill:new{ x = 100, y = 100, width = 16, height = 16, fill = { 255, 255, 255 } }
 
 		self.recLabel = Text:new { x = 750, y = 10, tint = { 1, 0, 0 }, text = 'REC', visible = false } 
-		self.view.tween:start{ target = self.recLabel, prop = 'alpha', to = 0,
-							   duration = 0.25, onComplete = Tween.reverse }
+		self.view.tween:start(self.recLabel, 'alpha', 0, 0.25):andThen(Tween.reverseForever)
 
 		self:add(self.player)
 		self:add(cursor)

File tests/scrolling.lua

 			layer4:add(Tile:new{ x = x, y = 400, image = 'tests/assets/bluegem.png', scale = 4 })
 		end
 		
-		self.view.tween:start{ target = self.view.translate, prop = 'x',
-							   to = self.width * -4, duration = 10,
-							   ease = 'quadInOut', onComplete = Tween.reverse }
+		self.view.tween:start(self.view.translate, 'x', self.width * -4, 10, 'quadInOut')
+		:andThen(Tween.reverseForever)
 
 		layer4:add(Text:new
 		{

File tests/sounds.lua

 		self.signal = Fill:new{ x = 100, y = 100, width = 100, height = 100, fill = { 0, 0, 255 } }
 		self:add(self.signal)
 
-		self.timer:start{ func = self.testSound.play, delay = 1, bind = self.testSound }
+		self.timer:after(1, bind(self.testSound, 'play'))
 
 		self:add(Text:new
 		{

File tests/subview.lua

 			end,
 
 			onActivate = function (self)
-				self.tween:start{ target = self.bg, prop = 'alpha', to = 0.5, duration = 0.5, onComplete = Tween.reverse }
+				self.tween:start(self.bg, 'alpha', 0.5, 0.5):andThen(Tween.reverseForever)
 			end
 		}