Пример #1
0
 public Scene6(Game game, ContentManager content, GameComponentCollection components)
     : base(game, content, components)
 {
     Components = components;
     Content = content;
     colorList = GameTools.elementColors(colorList);
     gameStorage = new GameData("lobby");
 }
Пример #2
0
        public Scene5(Game game, ContentManager content, GameComponentCollection components)
            : base(game, content, components)
        {
            Components = components;
            Content = content;
            colorList = GameTools.elementColors(colorList);
            gameStorage = new GameData("lobby");

            // TODO: Construct any child components here
        }
Пример #3
0
 public Scene1(Game game, ContentManager content, GameComponentCollection components)
     : base(game, content, components)
 {
     Components = components;
     Content = content;
     colorList = GameTools.elementColors(colorList);
     gameStorage = new GameData("lobby");
     if (gameStorage.fileExists(gameStorage.FileName) == false)
         gameStorage.saveProgression(0);
 }
Пример #4
0
        protected override void UnloadContent()
        {
            accelSensor = null;
            indicator = null;
            basketLeft = null;
            basketOpeningLeft = null;

            basketRight = null;
            mama = null;
            boy = null;
            toy = null;
            talkingBubble = null;
            gameStorage = null;
            toysBackground = null;
            toysForeground = null;
            toyName = null;
            gameStorage = null;
            spriteBatch = null;
            mannTexture = null;
            mannTexture2 = null;
            mannTexture3 = null;
            basketTxt = null;
            boyDissapointedTxt = null;
            roomTexture = null;
            crayonTxt = null;
            guiBubbleTxt = null;
            basketLeftTxt = null;
            basketOpeningTxt = null;
            loadScreen = null;
            pauseScreenTxt = null;
            indicatorTxt = null;

            resumeTxt = null;
            restartTxt = null;
            pauseButtonTxt = null;
            menuButtonTxt = null;
            mamaTxt = null;
            roomdooropen = null;
            mannRect = Rectangle.Empty;
            bskHit = Rectangle.Empty;
            basketLeftRect = Rectangle.Empty;
            mannRect2 = Rectangle.Empty;
            mannRect3 = Rectangle.Empty;
            defaultRect = Rectangle.Empty;
            roomRect = Rectangle.Empty;
            indicatorRct = Rectangle.Empty;
            crayonRect = Rectangle.Empty;
            guiBubbleRct = Rectangle.Empty;
            basketOpeningRct = Rectangle.Empty;
            basketRightRect = Rectangle.Empty;
            basketOpeningLRct = Rectangle.Empty;
            basketOpeningRRct = Rectangle.Empty;
            bskHitL = Rectangle.Empty;
            bskHitR = Rectangle.Empty;
            pauseScreenRect = Rectangle.Empty;
            restartRect = Rectangle.Empty;
            resumeRect = Rectangle.Empty;
            pauseButtonRect = Rectangle.Empty;
            menuButtonRect = Rectangle.Empty;
            mamaRct = Rectangle.Empty;
            mannRect4 = Rectangle.Empty;
            gameGUI = null;
            colorList = null;

            rnd = null;
            toy = null;
            spriteFont = null;
            boy = null;
            roomBackground = null;
            basketOpening = null;
            basketOpeningLeft = null;
            basketOpeningRight = null; basketRight = null;
            pauseScreen = null;
            resumeButton = null;
            restartButton = null;
            pauseButton = null;
            menuButton = null;
            indicator = null;
            mama = null;

            Components.Clear();
            for (int i = 0; i < rectangles.Length; i++)
            {
                rectangles[i] = Rectangle.Empty;
            }
            if (crayons != null)
            {
                for (int c = 0; c < crayons.Length; c++)
                {
                    crayons[c] = null;

                }
            }
            crayons = null;
            backgroundMusic = null;
            yeah = null;
            ohno = null;
            myBoy = null;
            toysCollected.Clear();
            toysCollected = null;
            yeahinst = null;
            ohnoinst = null;
            backgroundMusicInst = null;
            myBoyInst = null;
            graphics = null;
            vibration = null;
            gameMS = null;
            toysBackground = null;
            toysForeground = null;
            toyName = string.Empty;
            toyNamePrefix = string.Empty;
            musicStateStopped = string.Empty;
            for (int r = 0; r < rectangles.Length; r++)
                rectangles[r] = Rectangle.Empty;
            Content.Unload();
            while (Components.Count > 0)
                Components.RemoveAt(0);

            for (int txt = 0; txt < textures.Length; txt++)
            {
                textures[txt] = null;
            }

            textures = null;
            unLoadPauseScreen();

            base.UnloadContent();

            string test = GC.GetTotalMemory(true).ToString();
        }