當前位置: 首頁>>代碼示例>>C#>>正文


C# Camera.CenterCamera方法代碼示例

本文整理匯總了C#中Camera.CenterCamera方法的典型用法代碼示例。如果您正苦於以下問題:C# Camera.CenterCamera方法的具體用法?C# Camera.CenterCamera怎麽用?C# Camera.CenterCamera使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Camera的用法示例。


在下文中一共展示了Camera.CenterCamera方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ResetCamera

 public void ResetCamera()
 {
     _camera = new Camera(_gameMain.Galaxy.GalaxySize * 60, _gameMain.Galaxy.GalaxySize * 60, _gameMain.ScreenWidth, _gameMain.ScreenHeight);
     _camera.CenterCamera(_camera.Width / 2, _camera.Height / 2, _camera.MaxZoom);
 }
開發者ID:rjaxon,項目名稱:beyond-beyaan,代碼行數:5,代碼來源:ProcessingTurnScreen.cs

示例2: OnGalaxyGenerated

 private void OnGalaxyGenerated()
 {
     _generatingGalaxy = false;
     _gameMain.Galaxy.OnGenerateComplete = null;
     camera = new Camera(_gameMain.Galaxy.GalaxySize * 60, _gameMain.Galaxy.GalaxySize * 60, 190, 190);
     camera.CenterCamera(camera.Width / 2, camera.Height / 2, camera.MaxZoom);
 }
開發者ID:Beyonders,項目名稱:Beyond-Beyaan,代碼行數:7,代碼來源:NewGame.cs

示例3: Initialize

        public bool Initialize(GameMain gameMain, out string reason)
        {
            _gameMain = gameMain;
            _camera = new Camera(gameMain.Galaxy.GalaxySize * 60, gameMain.Galaxy.GalaxySize * 60, gameMain.ScreenWidth, gameMain.ScreenHeight);
            _camera.CenterCamera(_camera.Width / 2, _camera.Height / 2, _camera.MaxZoom);

            _updateStep = 0;

            _exploredSystemsThisTurn = new Dictionary<Empire, List<StarSystem>>();
            _colonizableFleetsThisTurn = new Dictionary<Empire, List<Fleet>>();
            _newResearchTopicsNeeded = new Dictionary<Empire, List<TechField>>();

            _systemInfoWindow = new SystemInfoWindow();
            if (!_systemInfoWindow.Initialize(gameMain, out reason))
            {
                return false;
            }

            _systemView = new SystemView();
            if (!_systemView.Initialize(gameMain, "ProcessingScreen", out reason))
            {
                return false;
            }

            _colonizeScreen = new ColonizeScreen();
            if (!_colonizeScreen.Initialize(gameMain, out reason))
            {
                return false;
            }

            _researchPrompt = new ResearchPrompt();
            if (!_researchPrompt.Initialize(gameMain, out reason))
            {
                return false;
            }

            _starName = new RenderImage("starNameProcessingTurnRendered", 1, 1, ImageBufferFormats.BufferRGB888A8);
            _starName.BlendingMode = BlendingModes.Modulated;

            reason = null;
            return true;
        }
開發者ID:rjaxon,項目名稱:beyond-beyaan,代碼行數:42,代碼來源:ProcessingTurnScreen.cs


注:本文中的Camera.CenterCamera方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。