本文整理匯總了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);
}
示例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);
}
示例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;
}