Esempio n. 1
0
 public void AddNode(string objectFilename)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         var node = WorldSnapshot.CreateAddNode(objectFilename, Game.Player.ObjectToParent);
         if (node != null)
         {
             editorPlugin.AddUndoCommand(this, new AddUndoCommandEventArgs(new AddWorldSnapshotNodeCommand(node)));
         }
     });
 }
Esempio n. 2
0
        private void btnAddWsNode_Click(object sender, EventArgs e)
        {
            GroundSceneCallbacks.AddUpdateLoopCall(() =>
            {
                WorldSnapshotReaderWriter.Node node = WorldSnapshot.CreateAddNode("object/tangible/furniture/elegant/shared_chair_s01.iff", Game.Player.ObjectToParent);

                if (node != null)
                {
                    editorPlugin.AddUndoCommand(this, new AddUndoCommandEventArgs(new AddWorldSnapshotNodeCommand(node)));
                }
            });
        }
Esempio n. 3
0
        private void CreateSnapshotNodeAtPlayer()
        {
            GroundSceneCallbacks.AddUpdateLoopCall(() =>
            {
                WorldSnapshotReaderWriter.Node node = WorldSnapshot.CreateAddNode((string)lbFiles.SelectedItem, Game.Player.Transform);

                if (node != null)
                {
                    editorPlugin.AddUndoCommand(this, new AddUndoCommandEventArgs(new AddWorldSnapshotNodeCommand(node)));
                }
            });
        }
Esempio n. 4
0
        private void ConvertDragDropObjectToWorldSnapshotNode(string objectFilename)
        {
            GroundSceneCallbacks.AddUpdateLoopCall(() =>
            {
                if (!hasValidDragLocation)
                {
                    // Cleanup the temporary DragDrop object
                    CleanUpDragDropObject();
                    return;
                }

                WorldSnapshotReaderWriter.Node node = WorldSnapshot.CreateAddNode(objectFilename, dragDropObject.Transform);

                if (node != null)
                {
                    editorPlugin.AddUndoCommand(this, new AddUndoCommandEventArgs(new AddWorldSnapshotNodeCommand(node)));
                }

                // Cleanup the temporary DragDrop object
                CleanUpDragDropObject();
            });
        }