Esempio n. 1
0
    //----------------------------------------------------------------------------------
    public override CommandNode DeepClone( GameObject go )
    {
      CNGroup clonedGroup = CRTreeNode.CreateInstance<CNGroup>(go);
      CloneData( clonedGroup );

      for ( int i = 0 ; i < ChildCount; ++i )
      {
        CommandNode child = (CommandNode) Children[i];
        CommandNode cloneChild = child.DeepClone( go );
        cloneChild.Parent = clonedGroup;
      }

      return clonedGroup;
    }
Esempio n. 2
0
    //----------------------------------------------------------------------------------
    public override CommandNode DeepClone( GameObject go)
    {
      CNGroup clonedGroup = CRTreeNode.CreateInstance<CNGroup>(go);

      clonedGroup.field_ = field_.DeepClone();

      clonedGroup.Name               = Name;
      clonedGroup.IsOpen             = IsOpen;
      clonedGroup.isEffectRoot_      = isEffectRoot_;     

      for ( int i = 0 ; i < ChildCount; ++i )
      {
        CommandNode child = (CommandNode) Children[i];
        CommandNode cloneChild = child.DeepClone( go );
        cloneChild.Parent = clonedGroup;
      }

      return clonedGroup;
    }