Esempio n. 1
0
 public FadeablePage(Engine engine, GameLayer layer,GamePages page)
 {
     this.engine = engine;
     this.layer = layer;
     this.page = page;
     layer.Pages[page] = this;
 }
Esempio n. 2
0
 public FadeablePage(Engine engine, GameLayer layer, GamePages page)
 {
     this.engine       = engine;
     this.layer        = layer;
     this.page         = page;
     layer.Pages[page] = this;
 }
Esempio n. 3
0
        /// <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;
        }
Esempio n. 4
0
        /// <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;
        }
Esempio n. 5
0
 public void gotoPage(GamePages page)
 {
     Pages[CurrentPage].FadeState = FadeStates.FadeOut;
     Pages[page].FadeState = FadeStates.Wait;
 }
Esempio n. 6
0
 public MainMenu(Engine engine, GameLayer layer, GamePages page)
     : base(engine, layer, page)
 {
     exitButton = new HoverButton(this, "exit", new Point(20, 450));
     exitButton.OnClick += onExitClick;
 }
Esempio n. 7
0
 public OptionsMenu(Engine engine, GameLayer layer, GamePages page) : base(engine, layer, page)
 {
     exitButton          = new HoverButton(this, "exit", new Point(20, 450));
     exitButton.OnClick += onExitClick;
 }
Esempio n. 8
0
 public void gotoPage(GamePages page)
 {
     Pages[CurrentPage].FadeState = FadeStates.FadeOut;
     Pages[page].FadeState        = FadeStates.Wait;
 }