public void AddUI(IGameUI _gameUI) { if (_gameUI != null) { this.gameUIs_.Add(_gameUI); } }
internal GraphicsHandler(IGameUI ui, Control gameArea) { this.ui = ui; GameArea = new GameArea(GraphicsConstants.GridAreaSize, gameArea, OnPaint); screenImage = new Bitmap(GraphicsConstants.GridAreaSize.Width, GraphicsConstants.GridAreaSize.Height); tileImage = new Bitmap(GraphicsConstants.GridAreaSize.Width, GraphicsConstants.GridAreaSize.Height); }
/// <summary> /// Implementação de <see cref="IInventory.Initialize"/> /// </summary> public void Initialize() { PlayerPrefs = DependencyInjector.Retrieve <IPlayerPrefs>(); GameService = DependencyInjector.Retrieve <IGameService>(); GameUI = DependencyInjector.Retrieve <IGameUI>(); LoadInventory(); }
public static void StartEngine(Settings settings, List <string> sequences, IGameUI ui) { var engine = new GameEngine(settings); for (var i = 0; i < sequences.Count; i++) { var result = engine.Run(sequences[i]); ui.ShowMessage(result, $"Sequence {i + 1}: "); engine.ResetGame(); } }
/// <summary> /// Resolve references to non-service entities. /// Subscribe to events. /// </summary> void Start() { // get registry lookups planet = registry.LookUp<IPlanet>("Planet"); gameUI = registry.LookUp<IGameUI>("GameUI"); // subscribe to events time.CountdownFinished += OnCountdownFinished; gameUI.onGameReady += OnGameReady; // turn on controls shipController.Connect(); // start the first wave gameUI.TriggerWaveStartAnimation(); }
/// <summary> /// Initialize UI manager (mostly load resources and set some defaults). /// </summary> /// <param name="contentManager">Content manager.</param> /// <param name="theme">Which UI theme to use (see options in Content/GeonBit.UI/themes/). This affect the appearance of all textures and effects.</param> static public UserInterface Initialize(IGameUI igame, ContentManager contentManager, string program, string theme, GraphicsDeviceManager graphics) { if (_content == null) //static { // store the content manager _content = contentManager; // init resources (textures etc) Resources.LoadContent(_content, program, igame.Game, theme); } var ui = new UserInterface(igame.GetMouseInputProvider(), igame.GetKeyboardInputProvider()); // create a default active user interface ui.Active = ui; ui.Active.Graphics = graphics; ui.Active.GameUI = igame; return(ui); }
/// <summary> /// Executado quando o jogo inicia /// </summary> public void Start() { m_GameUI = DependencyInjector.Retrieve <IGameUI>(); }
private protected Game(IGameUI owner, Control gameArea) { GraphicsHandler = new GraphicsHandler(owner, gameArea); InputHandler = new InputHandler(); SoundHandler = new SoundHandler(); }
private void AddGameUI(IGameUI ui) { ui.IsEnabled = !ToolMode.IsEnabled; _gameUis.Add(ui); }
public GameManager(ISerializer serializer, IGameUI gameUI) { _serializer = serializer; _gameUI = gameUI; }
/// <summary> /// Initialize UI manager (mostly load resources and set some defaults). /// </summary> /// <param name="contentManager">Content manager.</param> /// <param name="program">Program name for runtime resources</param> /// <param name="theme">Which UI theme to use. This affect the appearance of all textures and effects.</param> static public void Initialize(IGameUI igame, ContentManager contentManager, string program, BuiltinThemes theme, GraphicsDeviceManager graphics) { Initialize(igame, contentManager, program, theme.ToString(), graphics); }
public Game(IGameUI ui) { _ui = ui; }