public SceneGameStage(map.Map map) { sceneType = SceneType.GameStage; _map = map; #region メニューアイテム _clearMenuItems = new MenuItem[] { new MenuItem(Key.M, Properties.Resources.MenuItem_MapSelect), new MenuItem(Key.T, Properties.Resources.MenuItem_ReturnTitle) }; #endregion _keys = new Key[] { Key.UpArrow, Key.DownArrow, Key.Return, Key.Escape, Key.R, Key.M, Key.T }; // 画像読み込み _lifeSurfaces = ResourceManager.LoadSurfaces(Constants.Filename_LifeImage, new Size(30, 32)); #region 配置 _viewRect = new Rectangle( Constants.ScreenWidth - Constants.StageViewWidth - Constants.StageMargin, Constants.StageMargin, Constants.StageViewWidth, Constants.StageViewHeight); _keyRect = new Rectangle( Constants.StageMargin, Constants.StageMargin, _viewRect.Left - 1 - Constants.StageMargin, Constants.StageViewHeight); _miniMapRect = new Rectangle( Constants.ScreenWidth - Constants.MiniMapWidth - Constants.StageMargin, _viewRect.Bottom + Constants.StageGap, Constants.MiniMapWidth, Constants.ScreenHeight - Constants.StageMargin - _viewRect.Bottom - Constants.StageGap); _playerInfoRect = new Rectangle( Constants.StageMargin, _viewRect.Bottom + Constants.StageGap, _miniMapRect.Left - Constants.StageMargin - Constants.StageGap, _miniMapRect.Height); #endregion #region PID制御係数決定 _prevYDiff = 0; _yDiff = 0; _coefP = 0.5; _coefI = _coefP * 0.4; _coefD = _coefP * 0.01; _diffT = 1 / (double)SdlDotNet.Core.Events.TargetFps; #endregion }
public GameplayScreen() { player = new Player(); map = new map.Map(); view = managers.screenManager.GameScreenManager.Instance.GraphicsDevice.Viewport; }