private void LoadMenu() { bool won = ServiceProvider.GetService <IGameStateService>().Won; IMenuEntityFactory menuFactory = (IMenuEntityFactory)EntityFactory; menuFactory.CreateBackground(won ? "Win" : "GameOver"); menuFactory.CreateButton(string.Empty, "OkButton", new Vector2(0f, 0f), new Vector2(0.8f, 0.22f), "MainMenu"); }
private void LoadMenu() { IMenuEntityFactory menuFactory = (IMenuEntityFactory)EntityFactory; menuFactory.CreateBackground("MenuBackground"); menuFactory.CreateButton(string.Empty, "StartButton", new Vector2(0f, 0f), new Vector2(0.8f, 0.22f), "LevelSelection"); menuFactory.CreateButton(string.Empty, "ExitButton", new Vector2(0f, 0.55f), new Vector2(0.8f, 0.22f), null); }
private void LoadMenu() { IMenuEntityFactory menuFactory = (IMenuEntityFactory)EntityFactory; menuFactory.CreateBackground("MenuBackground"); menuFactory.CreateButton(string.Empty, "OldForest", new Vector2(0f, 0f), new Vector2(0.8f, 0.22f), "Map1"); menuFactory.CreateButton(string.Empty, "SnowyCanyon", new Vector2(0f, 0.275f), new Vector2(0.8f, 0.22f), "Map2"); menuFactory.CreateButton(string.Empty, "Return", new Vector2(0f, 0.55f), new Vector2(0.8f, 0.22f), "MainMenu"); }