예제 #1
0
 public void Save()
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         WorldSnapshotReaderWriter.Get().SaveFile("");
     });
 }
예제 #2
0
 public void Reload()
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         WorldSnapshot.Reload();
     });
 }
예제 #3
0
 public void SaveAs(string snapshotName)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         WorldSnapshotReaderWriter.Get().SaveFile(snapshotName);
     });
 }
예제 #4
0
 public void Load(string filename)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         WorldSnapshot.Load(filename);
     });
 }
예제 #5
0
 public void CreateAppearance(string filename)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         GroundScene.Get().CreateAppearanceAtPlayer(filename);
     });
 }
예제 #6
0
 public void SetWeatherIndex(int value)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         Terrain.Get().WeatherIndex = value;
     });
 }
예제 #7
0
 public void SetOperationModeToRotation()
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         imgui_impl.SetOperationModeToRotate();
     });
 }
예제 #8
0
 public void CreateObject(string filename)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         GroundScene.Get().CreateObjectAtPlayer(filename);
     });
 }
예제 #9
0
 public void Teleport(float x, float y, float z)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         Game.Camera.Transform.SetPosition(x, y, z);
     });
 }
예제 #10
0
 public void ToggleModel()
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         UtinniCore.Utinni.PlayerObject.player_object.TogglePlayerAppearance();
     });
 }
예제 #11
0
 public void EnableDragPlayer(bool value)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         UtinniCore.Utinni.DebugCamera.debug_camera.EnableDragPlayer(value);
     });
 }
예제 #12
0
        public void SetSelectedNodePosition(float x, float y, float z)
        {
            GroundSceneCallbacks.AddUpdateLoopCall(() =>
            {
                var obj = Game.PlayerLookAtTargetObject;
                if (obj != null)
                {
                    var node = WorldSnapshotReaderWriter.Get().GetNodeById((int)obj.NetworkId, obj.ParentObject);
                    if (node != null)
                    {
                        if (node.ParentId != 0)
                        {
                            Vector oldO2w = obj.ObjectToWorld.Position;
                            Vector oldO2p = obj.ObjectToParent.Position;

                            Vector deltaPos            = new Vector(oldO2p.X - x, oldO2p.Y - y, oldO2p.Z - z);
                            obj.ObjectToWorld.Position = new Vector(oldO2w + deltaPos);
                            obj.ObjectToParent.SetPosition(x, y, z);
                        }
                        else
                        {
                            obj.Transform.SetPosition(x, y, z);
                        }
                        obj.PositionAndRotationChanged(false, node.Transform.Position);

                        editorPlugin.AddUndoCommand(this, new AddUndoCommandEventArgs(new WorldSnapshotNodePositionChangedCommand(node, node.Transform, obj.Transform)));
                        node.Transform.SetPosition(x, y, z);
                    }
                }
            });
        }
예제 #13
0
 public void ToggleFreeCam()
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         GroundScene.Get().ToggleFreeCamera();
     });
 }
예제 #14
0
 public void Execute()
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         WorldSnapshot.AddNode(nodeCopy);
     });
 }
예제 #15
0
 public void AllowTargetEverything(bool value)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         cui_hud.PatchAllowTargetEverything(value);
     });
 }
예제 #16
0
 public void SetTimeOfDay(float value)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         Terrain.Get().TimeOfDay = value / 1000f; // divide by 1000f to get the correct decimal value
     });
 }
예제 #17
0
 public void SetSnapScale(float value)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         imgui_impl.SetSnapSize(value);
     });
 }
예제 #18
0
 public void SetGizmoSnap(bool value)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         imgui_impl.EnableSnap(value);
     });
 }
예제 #19
0
 public void SetSpeed(float value)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         //modifiedSpeed = value;
         UtinniCore.Utinni.PlayerObject.player_object.SetSpeed(value);
     });
 }
예제 #20
0
 public void SetSpeed(float value)
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         //modifiedSpeed = value;
         UtinniCore.Utinni.DebugCamera.debug_camera.SetSpeed(value);
     });
 }
예제 #21
0
 public void TeleportToCamera()
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         var pos = Game.Camera.Transform.Position;
         UtinniCore.Utinni.PlayerObject.player_object.Teleport(pos.X, 0, pos.Y);
     });
 }
예제 #22
0
 public void SetGizmoToWorld()
 {
     GroundSceneCallbacks.AddUpdateLoopCall(() =>
     {
         imgui_impl.SetGizmoModeToWorld();
     });
     //snapshotPanel.UpdateGizmoModeControls(false);
 }
예제 #23
0
        public void TeleportToPlayer()
        {
            GroundSceneCallbacks.AddUpdateLoopCall(() =>
            {
                var pos = Game.Player.Transform.Position;

                Game.Camera.Transform.SetPosition(pos.X, pos.Y + 10, pos.Z);
            });
        }
예제 #24
0
        public void ResetSpeed()  // ToDo
        {
            GroundSceneCallbacks.AddUpdateLoopCall(() =>
            {
                UtinniCore.Utinni.DebugCamera.debug_camera.SetSpeed(defaultSpeed);
            });

            freeCamPanel.UpdateSpeed(defaultSpeed);
        }
예제 #25
0
        public void ResetSpeed()
        {
            GroundSceneCallbacks.AddUpdateLoopCall(() =>
            {
                UtinniCore.Utinni.PlayerObject.player_object.SetSpeed(defaultSpeed);
            });

            playerPanel.UpdateSpeed(defaultSpeed);
        }
예제 #26
0
        public void ToggleGizmoSnapHotkey()
        {
            bool hasSnapOn = !imgui_impl.IsSnapOn();

            GroundSceneCallbacks.AddUpdateLoopCall(() =>
            {
                imgui_impl.EnableSnap(hasSnapOn);
            });
            snapshotPanel.UpdateGizmoSnapControl(hasSnapOn);
        }
예제 #27
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)));
         }
     });
 }
예제 #28
0
        public void Teleport(float x, float y, float z)
        {
            GroundSceneCallbacks.AddUpdateLoopCall(() =>
            {
                if (GroundScene.Get().IsFreeCameraActive)
                {
                    GroundScene.Get().ToggleFreeCamera();
                }

                UtinniCore.Utinni.PlayerObject.player_object.Teleport(x, y, z);
            });
        }
예제 #29
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)));
                }
            });
        }
예제 #30
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)));
                }
            });
        }