コード例 #1
0
        private void UpdateToSavedCameraPosition()
        {
            if (WireframeEditControlsViewModel.SelectedTextureFilePath != null && CameraPositionsForTexture.ContainsKey(WireframeEditControlsViewModel.SelectedTextureFilePath))
            {
                var vector3 = CameraPositionsForTexture[WireframeEditControlsViewModel.SelectedTextureFilePath];

                mManagers.Renderer.Camera.Position = new Vector2(vector3.X, vector3.Y);
            }
            else
            {
                mManagers.Renderer.Camera.Position = new Vector2();
            }
        }
コード例 #2
0
        private void UpdateToSavedCameraPosition()
        {
            string fileName = null;

            fileName = WireframeEditControlsViewModel.SelectedTextureFilePath?.Standardized;

            if (CameraPositionsForTexture.ContainsKey(fileName))
            {
                var vector3 = CameraPositionsForTexture[fileName];

                mManagers.Renderer.Camera.Position = new Vector2(vector3.X, vector3.Y);
            }
            else
            {
                mManagers.Renderer.Camera.Position = new Vector2();
            }
        }