Prechádzať zdrojové kódy

Merge branch 'next' of https://github.com/blackberry/GamePlay into next

Darryl Gough 12 rokov pred
rodič
commit
cb15fe4140
1 zmenil súbory, kde vykonal 7 pridanie a 1 odobranie
  1. 7 1
      gameplay/src/Node.cpp

+ 7 - 1
gameplay/src/Node.cpp

@@ -294,7 +294,13 @@ void Node::setUserPointer(void* pointer, void (*cleanupCallback)(void*))
 
 
 void Node::setActive(bool active)
 void Node::setActive(bool active)
 {
 {
-    _active = active;
+    if (_active != active)
+    {
+        if (_collisionObject)
+            _collisionObject->setEnabled(active);
+
+        _active = active;
+    }
 }
 }
 
 
 bool Node::isActive() const
 bool Node::isActive() const