Ejemplo n.º 1
0
        // PROPERTIES
        // none yet

        // CONSTRUCTOR
        public EntityManager(Game1 game, InsanityBar insane)
        {
            hitBoxState        = HitBoxState.No;
            objects            = new List <GameObject>();
            objectsInDrawOrder = new List <GameObject>();
            this.game          = game;
            this.insane        = insane;
            p = game.Player;

            for (int i = 0; i < game.TreeTiles.Count; i++)
            {
                objects.Add(game.TreeTiles[i]);
                objectsInDrawOrder.Add(game.TreeTiles[i]);
            }

            for (int i = 0; i < game.EnemyTiles.Count; i++)
            {
                objects.Add(game.EnemyTiles[i]);
                objectsInDrawOrder.Add(game.EnemyTiles[i]);
            }

            for (int i = 0; i < game.BoundaryTiles.Count; i++)
            {
                objects.Add(game.BoundaryTiles[i]);
                objectsInDrawOrder.Add(game.BoundaryTiles[i]);
            }

            //objects.Add(game.Rug);
            //objectsInDrawOrder.Add(game.Rug);

            objects.Add(p);
            objectsInDrawOrder.Add(p);
            rng = new Random();
        }
Ejemplo n.º 2
0
        //parameterized constructor that will set th efields to objects that are inputed into the constructor
        public TeaParty(ObjectiveObject vTeaKettle, ObjectiveObject vTeaCups, ObjectiveObject vPlate,
                        List <Point> initialObjSpawn, Game1 game, ObjectiveObject rug, InsanityBar vInsanity)
            : base()
        {
            teaKettle           = vTeaKettle;
            teaCups             = vTeaCups;
            plate               = vPlate;
            this.rug            = rug;
            numberOfCompletions = 0;

            this.initialObjSpawn = initialObjSpawn;
            this.game            = game;
            objSpawn             = new List <Point>();

            insanity = vInsanity;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch     = new SpriteBatch(GraphicsDevice);
            characterHitbox = Content.Load <Texture2D>("unnamed");

            //Menus and Screens
            mainMenu  = Content.Load <Texture2D>("MainMenu");
            pauseMenu = Content.Load <Texture2D>("PauseMenu");
            credits   = Content.Load <Texture2D>("CreditsScreen");
            controls  = Content.Load <Texture2D>("ControlsScreen");
            endScreen = Content.Load <Texture2D>("EndScreen");
            winScreen = Content.Load <Texture2D>("YouWin");

            tempBackground = Content.Load <Texture2D>("BackgroundPic");

            //Temp Background
            //tempBackground = Content.Load<Texture2D>("BackgroundPic");
            tree          = Content.Load <Texture2D>("Tree");
            treeInsane    = Content.Load <Texture2D>("TreeInsane");
            treeImages    = new Texture2D[2];
            treeImages[0] = treeInsane;
            treeImages[1] = characterHitbox;

            //Insanity Bar
            insanityBar0 = Content.Load <Texture2D>("NightmareBar0");
            insanityBar1 = Content.Load <Texture2D>("NightmareBar1");
            insanityBar2 = Content.Load <Texture2D>("NightmareBar2");
            insanityBar3 = Content.Load <Texture2D>("NightmareBar3");
            insanityBar4 = Content.Load <Texture2D>("NightmareBar4");
            insanityBar5 = Content.Load <Texture2D>("NightmareBar5");

            insanityBarImages[0] = insanityBar0;
            insanityBarImages[1] = insanityBar1;
            insanityBarImages[2] = insanityBar2;
            insanityBarImages[3] = insanityBar3;
            insanityBarImages[4] = insanityBar4;
            insanityBarImages[5] = insanityBar5;
            insanity             = new InsanityBar(insanityBar0, insanityBarImages);

            //loading the objective object plate into the game
            platePicture     = Content.Load <Texture2D>("Plate");
            texturesPlate    = new Texture2D[1];
            texturesPlate[0] = platePicture;
            plate            = new ObjectiveObject(300, 300, texturesPlate);

            //loading in the objective object tea kettle into the game
            teaKetlePictures     = Content.Load <Texture2D>("TeaKettle");
            texturesTeaKettle    = new Texture2D[1];
            texturesTeaKettle[0] = teaKetlePictures;
            teaKettle            = new ObjectiveObject(1500, 1000, texturesTeaKettle);

            //loading in the objective object tea cup into the game
            cupsPictures    = Content.Load <Texture2D>("TeaCup");
            texturesCups    = new Texture2D[1];
            texturesCups[0] = cupsPictures;
            cups            = new ObjectiveObject(1700, 400, texturesCups);

            invisible           = Content.Load <Texture2D>("blank");
            textureInvisible    = new Texture2D[1];
            textureInvisible[0] = invisible;

            //Character and Enemies
            teddy0            = Content.Load <Texture2D>("masterSpriteSheet");
            teddy1            = Content.Load <Texture2D>("TeddyDeath");
            character         = Content.Load <Texture2D>("Character");
            masterSpriteSheet = Content.Load <Texture2D>("MasterSpriteSheet");

            characterImages    = new Texture2D[12];
            characterImages[0] = character;
            characterImages[1] = characterHitbox;

            arial12 = Content.Load <SpriteFont>("arial12");

            //sets the black background to a blank picture
            blackBackground = Content.Load <Texture2D>("unnamed");


            //Array of bears
            bears    = new Texture2D[3];
            bears[0] = masterSpriteSheet;
            bears[1] = teddy1;
            bears[2] = characterHitbox;

            //Songs
            mainMenuSong = Content.Load <Song>("MainMenuMusic");

            //start the game by playing main menu song
            MediaPlayer.Play(mainMenuSong);

            gameSong     = Content.Load <Song>("maingame");
            gameOverSong = Content.Load <Song>("GameOverMusic");
            winSong      = Content.Load <Song>("WinGame Music");

            rugPicture     = Content.Load <Texture2D>("rug");
            rugTextures    = new Texture2D[1];
            rugTextures[0] = rugPicture;

            // TODO: use this.Content to load your game content here
        }