summaryrefslogtreecommitdiff
path: root/Runtime/GameCode/DestroyDelayed.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/GameCode/DestroyDelayed.cpp')
-rw-r--r--Runtime/GameCode/DestroyDelayed.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/Runtime/GameCode/DestroyDelayed.cpp b/Runtime/GameCode/DestroyDelayed.cpp
new file mode 100644
index 0000000..aeba252
--- /dev/null
+++ b/Runtime/GameCode/DestroyDelayed.cpp
@@ -0,0 +1,16 @@
+#include "UnityPrefix.h"
+#include "DestroyDelayed.h"
+#include "CallDelayed.h"
+#include "Runtime/Misc/GameObjectUtility.h"
+
+void DelayedDestroyCallback (Object* o, void* userData);
+
+void DelayedDestroyCallback (Object* o, void* userData)
+{
+ DestroyObjectHighLevel (o);
+}
+
+void DestroyObjectDelayed (Object* o, float time)
+{
+ CallDelayed (DelayedDestroyCallback, o, time);
+}