Example #1
0
        public MainMenuState()
        {
            MusicManager.PlayMusic(AssetManager.MusicName.MainMenu);
            Console.WriteLine("MAINMENUSTATE");
            profiles = new ManageProfiles();
            profiles = profiles.loadManageProfiles();
            Initialisation();
            background                    = new Sprite(AssetManager.GetTexture(AssetManager.TextureName.MainMenuBackground));
            shinyEffectBarSprite          = new Sprite(AssetManager.GetTexture(AssetManager.TextureName.ShinyEffectBar));
            shinyEffectBarSprite.Position = new Vector2(0, -3.9F * shinyEffectBarSprite.TextureRect.Height);

            testSpriteForCord          = new AnimatedSprite(AssetManager.GetTexture(AssetManager.TextureName.KeyAnimated), 0.1F, 8);
            testSpriteForCord.Position = new Vector2f(20, 100);
        }
Example #2
0
        public void Initialisation()
        {
            MusicManager.PlayMusic(AssetManager.MusicName.MainMenu);
            stopwatch = new Stopwatch();
            stopwatch.Start();
            stopwatch1 = new Stopwatch();
            stopwatch1.Start();
            funactivJoh      = false;
            funacitvBenni    = false;
            font             = FontLoader.Instance.LoadFont("Assets/Fonts/fixedsys.ttf");
            sexyFont         = FontLoader.Instance.LoadFont("Assets/Fonts/pixelhole.ttf");
            MainTitleColor   = new Color(0, 2, 42);
            ProfileNameColor = new Color(125, 253, 108);
            MenuTextColor    = new Color(114, 217, 100);

            buttonList = new List <Button>();
            buttonList.Add(new Button(new Vector2f(575, 275), new Vector2i(0, 0), AssetManager.GetTexture(AssetManager.TextureName.ProfileButton), AssetManager.GetTexture(AssetManager.TextureName.ProfileButtonGlow)));
            buttonList.Add(new Button(new Vector2f(575, 395), new Vector2i(0, 1), AssetManager.GetTexture(AssetManager.TextureName.ProfileButton), AssetManager.GetTexture(AssetManager.TextureName.ProfileButtonGlow)));
            buttonList.Add(new Button(new Vector2f(575, 515), new Vector2i(0, 2), AssetManager.GetTexture(AssetManager.TextureName.ProfileButton), AssetManager.GetTexture(AssetManager.TextureName.ProfileButtonGlow)));
            buttonList.Add(new Button(new Vector2f(1000, 275), new Vector2i(1, 0), AssetManager.GetTexture(AssetManager.TextureName.ProfileDeleteButton), AssetManager.GetTexture(AssetManager.TextureName.ProfileDeleteButtonGlow), AssetManager.GetTexture(AssetManager.TextureName.IconDelete)));
            buttonList.Add(new Button(new Vector2f(1000, 395), new Vector2i(1, 1), AssetManager.GetTexture(AssetManager.TextureName.ProfileDeleteButton), AssetManager.GetTexture(AssetManager.TextureName.ProfileDeleteButtonGlow), AssetManager.GetTexture(AssetManager.TextureName.IconDelete)));
            buttonList.Add(new Button(new Vector2f(1000, 515), new Vector2i(1, 2), AssetManager.GetTexture(AssetManager.TextureName.ProfileDeleteButton), AssetManager.GetTexture(AssetManager.TextureName.ProfileDeleteButtonGlow), AssetManager.GetTexture(AssetManager.TextureName.IconDelete)));
            buttonList.Add(new Button(new Vector2f(750, 645), new Vector2i(0, 3), AssetManager.GetTexture(AssetManager.TextureName.ProfileDeleteButton), AssetManager.GetTexture(AssetManager.TextureName.ProfileDeleteButtonGlow), AssetManager.GetTexture(AssetManager.TextureName.IconOptions)));
            buttonList.Add(new Button(new Vector2f(880, 645), new Vector2i(1, 3), AssetManager.GetTexture(AssetManager.TextureName.ProfileDeleteButton), AssetManager.GetTexture(AssetManager.TextureName.ProfileDeleteButtonGlow), AssetManager.GetTexture(AssetManager.TextureName.IconCredits)));
            buttonList.Add(new Button(new Vector2f(1000, 645), new Vector2i(2, 3), AssetManager.GetTexture(AssetManager.TextureName.ProfileDeleteButton), AssetManager.GetTexture(AssetManager.TextureName.ProfileDeleteButtonGlow), AssetManager.GetTexture(AssetManager.TextureName.IconExit)));

            gameTitle                = "RAMification!";
            currentTitleString       = "";
            currentlyAppendedLetters = "012";
            currentDeltaSum          = 0;

            // Witze hahahahhahaha witzig f****t....stfu das ist witzig..ne ist es nicht...ohh mr. Ernst! :/
            funBenni               = new Text("Benni heisst Online: KleinerHoden, hihi", font);
            funBenni.Position      = new Vector2f(800, 250);
            funBenni.CharacterSize = 30;
            funBenni.Color         = Color.Red;
            funBenni.Rotation      = 45;

            //Initializiere alle Texte
            gameName               = new SuperText("", sexyFont, 0.1f);
            gameName.Position      = new Vector2f(55, -65);
            gameName.CharacterSize = 240;
            gameName.Color         = MainTitleColor;

            profileOneText               = new SuperText(profiles.getProfileName(MemoryMaze.profiles.one), font, 0.15f);
            profileOneText.Position      = new Vector2f(240, 250);
            profileOneText.CharacterSize = 58;

            profileOnePercentage               = new SuperText("", font, 0.15f);
            profileOnePercentage.Position      = new Vector2f(775, 250);
            profileOnePercentage.CharacterSize = 58;

            profileTwoText               = new SuperText(profiles.getProfileName(MemoryMaze.profiles.two), font, 0.15f);
            profileTwoText.Position      = new Vector2f(240, 370);
            profileTwoText.CharacterSize = 58;

            profileTwoPercentage               = new SuperText("", font, 0.15f);
            profileTwoPercentage.Position      = new Vector2f(775, 370);
            profileTwoPercentage.CharacterSize = 58;

            profileThreeText               = new SuperText(profiles.getProfileName(MemoryMaze.profiles.three), font, 0.15f);
            profileThreeText.Position      = new Vector2f(240, 490);
            profileThreeText.CharacterSize = 58;

            ProfileThreePercentage               = new SuperText("", font, 0.15f);
            ProfileThreePercentage.Position      = new Vector2f(775, 490);
            ProfileThreePercentage.CharacterSize = 58;

            superTextList = new List <SuperText> {
                profileOneText, profileTwoText, profileThreeText, profileOnePercentage, profileTwoPercentage, ProfileThreePercentage
            };

            currentScreenPosition = new Vector2i(0, 0);

            UpdateProfilePercentage();
        }