public void LoadContent(GraphicsDevice graphicsDevice, ContentManager contentManager, ScreenDescription screenDescription) { ExecutionState = InnerExecutionState.INIT; _screenSizeInformation = screenDescription.ScreenSizeInformation; _spriteBatch = new SpriteBatch(graphicsDevice); _background = contentManager.Load <Texture2D>(screenDescription.AssetNameBackground); _font = contentManager.Load <SpriteFont>("Labels/LabelLarge"); // Pos Buttons var buttonspace = 10; var buttonWidth = (_screenSizeInformation.WidhtOuterScreen - 3 * buttonspace) / 2; var buttonHeigth = (_screenSizeInformation.HeightOuterScreen / 2 - 2 * buttonspace) / 2; _button = contentManager.Load <Texture2D>("RoundRectangle"); _BtnStart = Button.Create(buttonspace, _screenSizeInformation.HeightOuterScreen / 2, buttonWidth, buttonHeigth); _BtnMultiplayer = Button.Create(buttonspace, _screenSizeInformation.HeightOuterScreen / 2 + buttonHeigth + buttonspace, buttonWidth, buttonHeigth); _BtnEdit = Button.Create(buttonspace + buttonWidth + buttonspace, _screenSizeInformation.HeightOuterScreen / 2, buttonWidth, buttonHeigth); _BtnStatistic = Button.Create(buttonspace + buttonWidth + buttonspace, _screenSizeInformation.HeightOuterScreen / 2 + buttonHeigth, buttonWidth, buttonHeigth); }
public virtual void LoadContent(GraphicsDevice graphicsDevice, ContentManager contentManager, ScreenDescription screenDescription) { ExecutionState = InnerExecutionState.INIT; var width = (int)screenDescription.ScreenSizeInformation.WidhtInnerScreen; var height = (int)screenDescription.ScreenSizeInformation.HeightInnerScreen; _spriteBatch = new SpriteBatch(graphicsDevice); List <GameObject> gameObjects = new List <GameObject>(); foreach (GameObjectDescription description in screenDescription.Items) { var texture = contentManager.Load <Texture2D>(description.AssetName); var obj = GameObjectBuilder.Create() .SetPosition(description.CurrentPosition.X, description.CurrentPosition.Y) .SetOrientation(description.ObjectOrientation) .SetAssetName(description.AssetName) .SetSize((int)description.Width, (int)description.Height) .SetObjectType(description.GameObjectType) .Build(contentManager); gameObjects.Add(obj); } var background = contentManager.Load <Texture2D>(screenDescription.AssetNameBackground); _gameMediator = new GameMediator(screenDescription.ScreenSizeInformation); _gameMediator.Set(gameObjects.ToArray()); _gameMediator.SetBackground(background); // TODO remove after test _gameMediator.Set(contentManager.Load <SpriteFont>("Labels/LabelLarge")); }
public virtual void LoadContent(GraphicsDevice graphicsDevice, ContentManager contentManager, ScreenSequenceDescription screenSequenceDescription) { ExecutionState = InnerExecutionState.INIT; currentScreen = 0; var firstScreen = screenSequenceDescription.ScreenDescriptions.ElementAt(0); LoadScreen(graphicsDevice, contentManager, firstScreen); }
public void Update(GameTime gameTime, InputInformation inputInformation) { ExecutionState = InnerExecutionState.RUN; _inputInformation = inputInformation; }
public virtual void Update(GameTime gameTime, InputInformation inputInformation) { ExecutionState = InnerExecutionState.RUN; _gameMediator.Refresh(_spriteBatch, inputInformation); }