public void CreateCreditsArea()
        {
            this.DestroyMenu();

            this.Hud.ReloadShow = false;
            this.Hud.HomeShow   = false;
            this.Hud.BackShow   = true;
            this.Hud.ResizeShow = true;
            BackHudBtn backHudBtn = new BackHudBtn();

            backHudBtn.mainMenu = this;
            this.Hud.Back       = backHudBtn;
            this.Hud.Start(this.Content, this.Mouse, this.Screem);
            backHudBtn.CBody.Tag = "back";

            this.CreditsArea = new CreditsArea();
            this.CreditsArea.Localization = this.Localization;
            this.CreditsArea.Storage      = this.Storage;
            this.CreditsArea.Screem       = this.Screem;
            this.CreditsArea.Font         = this.Font;
            this.CreditsArea.FontBold     = this.FontBold;
            this.CreditsArea.Show         = true;
            this.CreditsArea.Start();

            this.UI.Add(this.CreditsArea);
        }
Beispiel #2
0
        protected override void LoadContent()
        {
            spriteBatch      = new SpriteBatch(GraphicsDevice);
            ScreemController = new ScreemController(graphics, graphics.GraphicsDevice.Adapter, GraphicsDevice, 0);

            // check game progress
            this.CheckFirstSettings();

            GameManager        = new Managers.GameManager(Content, ScreemController, Storage, this);
            GameManager.Screem = ScreemController;

            _spriteBatchEffect = new BasicEffect(graphics.GraphicsDevice);
            _spriteBatchEffect.TextureEnabled = true;

            Location = Content.Load <LocalizationDefinitions>("Languages");
        }
        public GameManager(ContentManager Content, ScreemController ScreemController, UmbrellaToolKit.Storage.Load Storage, Game1 Game)
        {
            this.Storage   = Storage;
            CurrentlyLevel = 0;

            this.Content = Content;
            this.Screem  = ScreemController;
            this.Game    = Game;

            this.FontBold     = Content.Load <SpriteFont>("Fonts/Quicksand-Bold");
            this.FontRegular  = Content.Load <SpriteFont>("Fonts/Quicksand-Regular");
            this.Localization = Content.Load <LocalizationDefinitions>("Languages");

            this.World         = new World();
            this.World.Gravity = new Vector2(0, 10);

            this.MusicSoundTrack        = Content.Load <SoundEffect>("Sound/kalimba-relaxation-music-by-kevin-macleod-from-filmmusic-io");
            this.soundInstance          = this.MusicSoundTrack.CreateInstance();
            this.soundInstance.Volume   = 0.1f;
            this.soundInstance.IsLooped = true;

            this.Mouse        = new MouseManager();
            this.MouseWhite   = Content.Load <Texture2D>("Sprites/UI/upLeft_white");
            this.MouseBlack   = Content.Load <Texture2D>("Sprites/UI/upLeft");
            this.Mouse.Sprite = this.MouseWhite;
            this.Mouse.SetPointMouse(this.World);
            this.Mouse.Show = true;

            this.WorldUIMainMenu         = new World();
            this.WorldUIMainMenu.Gravity = Vector2.Zero;
            this.Mouse.SetPointMouse(WorldUIMainMenu);

            this.SetAllLevels(Content);
            this.SetCreditsScene();

            this.SceneMainMenu              = new MainMenu();
            this.SceneMainMenu.Content      = this.Content;
            this.SceneMainMenu.Font         = this.FontRegular;
            this.SceneMainMenu.FontBold     = this.FontBold;
            this.SceneMainMenu.Screem       = this.Screem;
            this.SceneMainMenu.World        = this.World;
            this.SceneMainMenu.Mouse        = this.Mouse;
            this.SceneMainMenu.Screem       = this.Screem;
            this.SceneMainMenu.Game         = this.Game;
            this.SceneMainMenu.Localization = this.Localization;
            this.SceneMainMenu.Storage      = this.Storage;
            this.SceneMainMenu.GameManager  = this;

            List <bool>        levels           = this.Storage.getItemsBool("Progress");
            IEnumerable <bool> _levels_progress = from level in levels where level == true select level;

            if (_levels_progress.ToList <bool>().Count == 0)
            {
                this.CurrentlyStatus = GameStatus.PLAY;
            }
            else
            {
                this.SceneMainMenu.Start();
                this.CurrentlyStatus = GameStatus.MAIN_MENU;
            }
        }