Example #1
0
 /// <summary>
 /// When the user is changing node type, e.g., between fixed and winch,
 /// we receive a callback handling winch dependencies.
 /// </summary>
 private void OnNodeType()
 {
     if (m_winch != null)
     {
         if (Wire == null || Type != Wire.NodeType.WinchNode)
         {
             ScriptComponent.DestroyImmediate(m_winch);
             m_winch = null;
         }
     }
     else if (Wire != null && Type == Wire.NodeType.WinchNode)
     {
         m_winch      = Wire.gameObject.AddComponent <WireWinch>();
         m_winch.Wire = Wire;
     }
 }
Example #2
0
 public void Unregister(ScriptComponent component)
 {
 }