Пример #1
0
 private void addButton_Click(object sender, EventArgs e)
 {
     Client.Game.Map.CameraAngle a = new Client.Game.Map.CameraAngle
     {
         Name = nameTextBox.Text,
     };
     SetupAngle(a);
     cameraAngles.Add(a);
     UpdateList();
 }
 private void addButton_Click(object sender, EventArgs e)
 {
     Client.Game.Map.CameraAngle a = new Client.Game.Map.CameraAngle
     {
         Name = nameTextBox.Text,
     };
     SetupAngle(a);
     cameraAngles.Add(a);
     UpdateList();
 }
Пример #3
0
        private void useButton_Click(object sender, EventArgs e)
        {
            Client.Game.Map.CameraAngle a = cameraAnglesListBox.SelectedItem as Client.Game.Map.CameraAngle;
            if (a == null)
            {
                return;
            }

            var camera = (Graphics.LookatSphericalCamera)MainWindow.Instance.worldView.Scene.Camera;

            camera.Lookat   = a.Lookat;
            camera.Position = a.Position;
            camera.Up       = a.Up;
        }
Пример #4
0
 private void removeButton_Click(object sender, EventArgs e)
 {
     Client.Game.Map.CameraAngle a = cameraAnglesListBox.SelectedItem as Client.Game.Map.CameraAngle;
     cameraAnglesListBox.Items.Remove(a);
     cameraAngles.Remove(a);
 }
Пример #5
0
 private void setButton_Click(object sender, EventArgs e)
 {
     Client.Game.Map.CameraAngle a = cameraAnglesListBox.SelectedItem as Client.Game.Map.CameraAngle;
     SetupAngle(a);
 }
Пример #6
0
 void SetupAngle(Client.Game.Map.CameraAngle a)
 {
     a.Position = MainWindow.Instance.worldView.Scene.Camera.Position;
     a.Lookat   = ((Graphics.LookatCamera)MainWindow.Instance.worldView.Scene.Camera).Lookat;
     a.Up       = ((Graphics.LookatCamera)MainWindow.Instance.worldView.Scene.Camera).Up;
 }