   
   
   
-   func _addChild(node:SKNode!) {
+  func _addChild(node:SKNode!) {
     if node.parent != self {
       node.removeFromParent()
       self._addChild(node)
       self._addedChild(node);
-
-    }
-    
-  }
-  
-   func _insertChild(node: SKNode!, atIndex index: Int) {
+      
+    }
+    
+  }
+  
+  func _insertChild(node: SKNode!, atIndex index: Int) {
     if node.parent != self {
       node.removeFromParent()
       self._insertChild(node, atIndex: index)

  final private func _didAddToNode() {
    self.behaviour.didAddToNode?()
    if(self.node?.scene != nil) { self._didAddNodeToScene() }

  }
  final private func _didAddNodeToScene() {
    self.addObservers()
    self.behaviour.didAddNodeToScene?()
  }

  final private func _didRemoveFromNode() {
    self.removeObservers()
    self.behaviour.didRemoveNodeFromScene?()
  }

  final private func _didRemoveNodeFromScene() {
    self.removeObservers()
    self.behaviour.didRemoveNodeFromScene?()
  }
  
  final private func removeObservers() {
    for observer in self.observersOne { observer.remove() }
    for observer in self.observersTwo { observer.remove() }
    for observer in self.observersThree { observer.remove() }
    for observer in self.observersFour { observer.remove() }
  }
  
  deinit {

      }
    }
  }
  
  init(){}
  
  
  
  final private func addObservers() {
    self.removeObservers()
    let b = self.behaviour
    let scene = self.node!.scene!
    
    if let didChangeSceneSizedFrom = b.didChangeSceneSizedFrom {
      self.observersSize = hubSize.subscribeNotificationForName("SKC_didChangeSceneSizedFrom", sender: scene) { [weak self] notification in
        if let x = self { if x.isEnabled { didChangeSceneSizedFrom(notification.userInfo!) } }
      }
      
    }
    

    
    if let didUpdate = b.didUpdate {
      self.observerUpdated = hubUpdated.subscribeNotificationForName("SKC_didUpdate", sender: scene) { [weak self] notification in
        if let x = self { if x.isEnabled { didUpdate(notification.userInfo!) } }
      }
    }
    
    if let didEvaluateActions =  b.didEvaluateActions {
      self.observersEmpty.append(
        hubEmpty.subscribeNotificationForName("SKC_didEvaluateActions", sender: scene) { [weak self] notification in
          if let x = self { if x.isEnabled { didEvaluateActions() } }
        })
    }
    
    if let didSimulatePhysics = b.didSimulatePhysics? {
      self.observersEmpty.append(
        hubEmpty.subscribeNotificationForName("SKC_didSimulatePhysics", sender: scene) { [weak self] notification in
          if let x = self { if x.isEnabled { didSimulatePhysics() } }
        })
    }
    
    if let didApplyConstraints = b.didApplyConstraints? {
      self.observersEmpty.append(
        hubEmpty.subscribeNotificationForName("SKC_didApplyConstraints", sender: scene) { [weak self] notification in
          if let x = self { if x.isEnabled { didApplyConstraints() } }
        })
    }
    
    if let didFinishUpdate = b.didFinishUpdate {
      self.observersEmpty.append(
        hubEmpty.subscribeNotificationForName("SKC_didFinishUpdate", sender: scene) { [weak self] notification in
          if let x = self { if x.isEnabled { didFinishUpdate() } }
        })
    }
    
    if let didBeginContact = b.didBeginContact {
      self.observersContact.append(
        hubContact.subscribeNotificationForName("SKC_didBeginContact", sender: scene) { [weak self] notification in
          if let x = self { if x.isEnabled { didBeginContact(notification.userInfo!) } }
        })
    }
    
    if let didEndContact = b.didEndContact {
      self.observersContact.append(
        hubContact.subscribeNotificationForName("SKC_didEndContact", sender: scene) { [weak self] notification in
          if let x = self { if x.isEnabled { didEndContact(notification.userInfo!) } }
        })
    }
    
    if let didBeginContactWithNode =  b.didBeginContactWithNode {
      self.observersNodeContact.append(
        hubNodeContact.subscribeNotificationForName("SKC_didBeginContactWithNode", sender: scene) { [weak self] notification in
          if let x = self { if x.isEnabled { didBeginContactWithNode(notification.userInfo!) } }
        })
    }
    
    if let didEndContactWithNode = b.didEndContactWithNode {
      self.observersNodeContact.append(
        hubNodeContact.subscribeNotificationForName("SKC_didEndContactWithNode", sender: scene) { [weak self] notification in
          if let x = self { if x.isEnabled { didEndContactWithNode(notification.userInfo!) } }
        })
    }
    
    
