Exemplo n.º 1
0
        //screen transition

        public ScreenManager()
        {
            Dimensions           = new Vector2(640, 480);
            currentScreen        = new splashScreen();
            xmlGameScreenManager = new xmlManger <gameScreen>
            {
                Type = currentScreen.Type
            };
            currentScreen = xmlGameScreenManager.Load("Load/splashScreen.xml");
        }
Exemplo n.º 2
0
        public override void LoadContent()
        {
            base.LoadContent();
            font = content.Load <SpriteFont>(FontNames);
            xmlManger <Player> playerLoader = new xmlManger <Player>();
            xmlManger <Map>    mapLoader    = new xmlManger <Map>();

            player = playerLoader.Load("Load/MainGame/Player.xml");
            map    = mapLoader.Load("Load/MainGame/Maps/Map2.xml");
            player.LoadContent();
            map.LoadContent();
        }
Exemplo n.º 3
0
        void menu_OnMenuChange(object sender, EventArgs e)
        {
            xmlManger <Menu> xmlMenuManger = new xmlManger <Menu>();

            menu.UnloadContent();
            //Add trasnistion if you want

            menu = xmlMenuManger.Load(menu.ID);
            menu.LoadContent();
            menu.OnMenuChange += menu_OnMenuChange;
            menu.Transition(0.0f);
            foreach (MenuItem item in menu.Items)
            {
                item.Image.StrEffect();
                item.Image.ActivateEffect("FadeEffect");
            }
        }