本文整理汇总了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;
}