public AIState(CameraSystem camera, GameArea gameArea) : base(camera, gameArea) { _allowedInputs = new Type[] { typeof(Zoom), typeof(MoveCameraTagetLocation), typeof(SelectPrevNextObject), typeof(Click) , typeof(SelectPrevNextObject), typeof(MouseDownAction),typeof(MouseUpAction), typeof(MouseMoveAction), typeof(EndTurn)}; }
public BaseState(CameraSystem camera, GameArea gameArea) { _inputSystem = new InputSystem(); _inputSystem.DoAction += new DoAction(InputManager_DoAction); _objectSystem = ObjectSystem.GetInstance(); _cameraSystem = camera; _gameArea = gameArea; }
public Game(IView view) { _view = view; GameArea gameArea = new GameArea((int)view.GameViewSize.Width, (int)view.GameViewSize.Height, 6, 24); CameraSystem camera = new CameraSystem(view.GameViewSize, gameArea.GameAreaSize); _stateManager = new StateManager(gameArea, camera); _upTime = new Stopwatch(); }
public StateManager(GameArea gameArea, CameraSystem camera) { BaseState.EndState += new ChangeState(state_EndState); BaseState.PauseState += new ChangeState(state_PauseState); _initState = new InitState(camera, gameArea); _rtState = new RealTimeState(camera, gameArea); _pauseState = new PauseState(camera, gameArea); _endState = new EndState(camera, gameArea); _current = _initState; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here this.IsMouseVisible = true; int width = graphics.PreferredBackBufferWidth; int height = graphics.PreferredBackBufferHeight; GameArea gameArea = new GameArea(width, height, 6, 24); CameraSystem camera = new CameraSystem(new Size(width, height), gameArea.GameAreaSize); _stateManager = new StateManager(gameArea, camera); base.Initialize(); }
public InitState(CameraSystem camera, GameArea gameArea) : base(camera, gameArea) { _allowedInputs = new Type[] { typeof(EndTurn) }; }