[email protected] 8 سال پیش
والد
کامیت
4f9c8c6c04
2فایلهای تغییر یافته به همراه8 افزوده شده و 2 حذف شده
  1. 7 2
      oxygine/src/oxygine/actor/Actor.cpp
  2. 1 0
      oxygine/src/oxygine/actor/Actor.h

+ 7 - 2
oxygine/src/oxygine/actor/Actor.cpp

@@ -1420,16 +1420,21 @@ namespace oxygine
 
 
 
-    spTween setTimeout(timeMS dur, const EventCallback& cb, spActor root)
+    spTween setTimeout(timeMS dur, const EventCallback& cb, Actor* root)
     {
         if (!root)
-            root = getStage();
+            root = getStage().get();
         dur = std::max(dur, 1);
         spTween t = root->addTween(TweenDummy(), dur);
         t->setDoneCallback(cb);
         return t;
     }
 
+    spTween setTimeout(timeMS dur, const EventCallback& cb, spActor root)
+    {
+        return setTimeout(dur, cb, root.get());
+    }
+
     Transform getGlobalTransform2(spActor child, Actor* parent)
     {
         Transform t;

+ 1 - 0
oxygine/src/oxygine/actor/Actor.h

@@ -386,6 +386,7 @@ namespace oxygine
 
 
     /*Runs callback in time ms.Stage used as default actor*/
+    spTween setTimeout(timeMS dur, const EventCallback& cb, Actor* root);
     spTween setTimeout(timeMS dur, const EventCallback& cb, spActor root = 0);
 
     Vector2 convert_local2stage(spActor child, const Vector2& pos, spActor root = 0);