public FadeablePage(Engine engine, GameLayer layer,GamePages page) { this.engine = engine; this.layer = layer; this.page = page; layer.Pages[page] = this; }
public FadeablePage(Engine engine, GameLayer layer, GamePages page) { this.engine = engine; this.layer = layer; this.page = page; layer.Pages[page] = this; }
/// <summary> /// Allows the game component to perform any initialization it needs to before starting /// to run. This is where it can query for any required services and load content. /// </summary> public override void Initialize() { // TODO: Add your initialization code here foreach (FadeablePage page in Pages.Values) { page.Initialize(); } base.Initialize(); CurrentPage = GamePages.MainMenu; Pages[CurrentPage].FadeState = FadeStates.FadeIn; }
/// <summary> /// Allows the game component to perform any initialization it needs to before starting /// to run. This is where it can query for any required services and load content. /// </summary> public override void Initialize() { // TODO: Add your initialization code here foreach(FadeablePage page in Pages.Values) page.Initialize(); base.Initialize(); CurrentPage = GamePages.MainMenu; Pages[CurrentPage].FadeState = FadeStates.FadeIn; }
public void gotoPage(GamePages page) { Pages[CurrentPage].FadeState = FadeStates.FadeOut; Pages[page].FadeState = FadeStates.Wait; }
public MainMenu(Engine engine, GameLayer layer, GamePages page) : base(engine, layer, page) { exitButton = new HoverButton(this, "exit", new Point(20, 450)); exitButton.OnClick += onExitClick; }
public OptionsMenu(Engine engine, GameLayer layer, GamePages page) : base(engine, layer, page) { exitButton = new HoverButton(this, "exit", new Point(20, 450)); exitButton.OnClick += onExitClick; }