godot-start/zfoo/scheduler/SchedulerDefinition.gd

23 lines
456 B
GDScript
Raw Normal View History

2021-10-03 09:23:08 +00:00
extends Object
const Runnable = preload("res://zfoo/common/Runnable.gd")
# the time from now to delay execution
var delay: int
# 触发时间
var triggerTimestamp: int
# 是否重复
var repteated: bool
# 回调方法
var runnable: Runnable
func _init(runnable: Runnable, delay: int, triggerTimestamp: int, repteated: bool = false):
self.runnable = runnable
self.delay = delay
self.triggerTimestamp = triggerTimestamp
self.repteated = repteated