Ejemplo n.º 1
0
        //constructor
        public gameWorld(ContentManager _content, GraphicsDeviceManager _graphics)
        {
            //takes in a content manager plus the designated widtch and height of the game - optional
            instance = this;
            graphics = _graphics;
            content = _content;

            myScene = content.Load<Model>("Models\\farmYardNoSky[3]");
               // mySkyBox = content.Load<Model>("Models\\skybox[4]");
            aspectRatio = graphics.GraphicsDevice.Viewport.AspectRatio;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            //this.graphics.PreferredBackBufferWidth = 1280;
            //this.graphics.PreferredBackBufferHeight = 720;

            this.graphics.IsFullScreen = chooseFullScreen; //default is false
            this.graphics.ApplyChanges();
            world = new GameUI.gameWorld(Content, graphics);
            world.initializeWorld();
            tutLevel = new TutorialLevel(Content, graphics);
            tutLevel.initilizeTutorialLevel();

            //world.addComponent(world);

            //cameraViewMatrix = Matrix.CreateLookAt(
            //    cameraPosition,
            //    cameraLookAt,
            //    Vector3.Up);

            //cameraProjectionMatrix = Matrix.CreatePerspectiveFieldOfView(
            //    MathHelper.ToRadians(45.0f),
            //    graphics.GraphicsDevice.Viewport.AspectRatio,
            //    1.0f,
            //    10000.0f);

            //// TODO: Add your initialization logic here
            //myRooster = new RoosterClass(Content, graphics);
            //myRooster.InitializeRooster();

            ////create multiple chickens
            //ChickenClass myChicken = new ChickenClass(Content, graphics);
            //myChicken.InitializeChicken();

            //chickenList.Add(myChicken);
            ////on button press/chicken buy selection create another chicken object
            ////add graphics, and initialize then add to chickenlist
            //chickenList.Add(myChicken);

            //myCharacter = new CharacterClass(Content, graphics);
            //myCharacter.InitializeCharacter();

            //saveload
            result = Guide.BeginShowStorageDeviceSelector(PlayerIndex.One, null, null);
            device = Guide.EndShowStorageDeviceSelector(result);
            CheckWhetherExists(device);

            base.Initialize();
        }