/// <summary>
        /// Creates a new state
        /// </summary>
        /// <param name="manager"></param>
        public InputControllerState(InputManager manager)
        {
            _inputManager = manager;
            if (_inputManager == null)
                throw new InvalidOperationException("Inputmanager nog found");

            this.Type = BlockType.Normal;
        }
        /// <summary>
        /// Creates a new state
        /// </summary>
        /// <param name="manager"></param>
        public InputControllerState(InputManager manager, Int32 width, Int32 height)
        {
            _inputManager = manager;
            if (_inputManager == null)
                throw new InvalidOperationException("Inputmanager not found");

            this.Type = BlockType.Normal;
            this.MaxPos = new Vector2(width, height);
        }
        /// <summary>
        /// Initializes input controller
        /// </summary>
        public override void Initialize()
        {
            base.Initialize();

            _inputManager = this.Game.Services.GetService(typeof(InputManager)) as InputManager;
            if (_inputManager == null)
                throw new InvalidOperationException("Inputmanager nog found");

            _state = new InputControllerState(_inputManager);
            _timeController = this.Game.Services.GetService(typeof(TimeController)) as TimeController;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initialze sprite
        /// </summary>
        public override void Initialize()
        {
            base.Initialize();
            this.TextureName = "Graphics/Pea-Standard";
            this.Color = Color.Transparent;

            _inputManager = this.SceneLayer.Game.Services.GetService(typeof(InputManager)) as InputManager;
        }