mirror of
https://github.com/bakpakin/tiny-ecs.git
synced 2026-07-22 07:56:52 -06:00
First demo commit.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
local TimerEvent = class "TimerEvent"
|
||||
|
||||
function TimerEvent:init(time, fn)
|
||||
self.lifetime = time
|
||||
self.timerCallback = fn
|
||||
end
|
||||
|
||||
function TimerEvent:onLifeover()
|
||||
self.timerCallback()
|
||||
end
|
||||
|
||||
return TimerEvent
|
||||
Reference in New Issue
Block a user