Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Example of usage:
- -- DelayAction { time = 500 } -- time is in ms
- local Action = require("action")
- local DelayAction = class("DelayAction", Action)
- function DelayAction:initialize(params)
- Action.initialize(self, params)
- self.currentTime = 0
- end
- function DelayAction:update(dt)
- self.currentTime = self.currentTime + dt
- if self.currentTime >= self.time then
- self.isFinished = true
- end
- end
- return DelayAction
Advertisement
Add Comment
Please, Sign In to add comment