From 0e9ad14e9fcee242a68f695715fa106af99aa76f Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 14 Sep 2017 17:11:54 +0200 Subject: Timer now inherits after Trigger --- not/Timer.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'not') diff --git a/not/Timer.lua b/not/Timer.lua index 3e45b11..6fc4a4c 100644 --- a/not/Timer.lua +++ b/not/Timer.lua @@ -1,7 +1,6 @@ -Timer = require "not.Object":extends() +Timer = require "not.Trigger":extends() -function Timer:new (trigger, delay) - self.trigger = trigger +function Timer:new (delay) self.delay = delay self.left = 0 self.active = false @@ -16,7 +15,7 @@ end function Timer:update (dt) if self.active then if self.left < 0 then - self.trigger:emit() + self:emit() self.active = false if self.restart then self:start() -- cgit v1.1