Browse Source

added Tween::remove

dmuratshin 9 years ago
parent
commit
6e3793dbd6
2 changed files with 7 additions and 0 deletions
  1. 5 0
      oxygine/src/Tween.cpp
  2. 2 0
      oxygine/src/Tween.h

+ 5 - 0
oxygine/src/Tween.cpp

@@ -84,6 +84,11 @@ namespace oxygine
         return v;
     }
 
+	void Tween::remove()
+	{
+		getClient()->removeTween(this);
+	}
+
     void Tween::complete(timeMS deltaTime)
     {
         if (_loops == -1)

+ 2 - 0
oxygine/src/Tween.h

@@ -143,6 +143,8 @@ namespace oxygine
         /**immediately completes tween, calls doneCallback and mark tween as completed and removes self from Actor. If tween has infinity loops (=-1) then do nothing*/
         virtual void complete(timeMS deltaTime = std::numeric_limits<int>::max() / 2);
 
+        /**removes self from Actor, complete callback not called*/
+        void remove();
 
         void start(Actor& actor);
         void update(Actor& actor, const UpdateState& us);