diff options
Diffstat (limited to 'DTTimer.c')
| -rw-r--r-- | DTTimer.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/DTTimer.c b/DTTimer.c new file mode 100644 index 0000000..ecc5885 --- /dev/null +++ b/DTTimer.c @@ -0,0 +1,26 @@ +#strict 2
+
+global func AddTimer(callback, int timer, object target, int prio)
+{
+ target = target || this;
+ return AddEffect("IntTimer", target, prio || 1, timer, target, 0, callback);
+}
+
+global func RemoveTimer(int id, object target)
+{
+ target = target || this;
+ return RemoveEffect(0, target, id);
+}
+
+global func FxIntTimerStart(object target, int effectNumber, int temp, callback)
+{
+ if(!temp)
+ {
+ EffectVar(0, target, effectNumber) = callback;
+ }
+}
+
+global func FxIntTimerTimer(object target, int effectNumber, int effectTime)
+{
+ return Call(EffectVar(0, target, effectNumber));
+}
|
