public virtual void AppendNewGO(fGameObject go, fGameObject parent, bool bKeepPosition) { vObjects.Add(go); go.SetParent(parent, bKeepPosition); go.SetLayer(parent.GetLayer()); foreach (GameObject child_go in go.Children()) { vObjects.Add(child_go); child_go.SetLayer(parent.GetLayer()); } }
override public SceneObject Duplicate() { PivotSO copy = new PivotSO(); copy.parentScene = this.parentScene; copy.Create(this.GetAssignedSOMaterial(), this.frameMaterial, shapeGO.GetLayer()); copy.SetLocalFrame( this.GetLocalFrame(CoordSpace.ObjectCoords), CoordSpace.ObjectCoords); copy.MaintainConsistentViewSize = this.MaintainConsistentViewSize; return(copy); }
public virtual fMeshGameObject AppendMeshGO(string name, fMesh mesh, fMaterial setMaterial, fGameObject parent, bool bCollider = true) { fMeshGameObject go = new fMeshGameObject(mesh, true, bCollider); go.EnableCollisions = false; go.SetMaterial(setMaterial); go.SetName(name); vObjects.Add(go); parent.AddChild(go); go.SetLayer(parent.GetLayer()); return(go); }