예제 #1
0
파일: Game1.cs 프로젝트: jt222ic/game_lab1
        /// <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.
            camera.ScaleEverything(graphics.GraphicsDevice.Viewport);

            spriteBatch = new SpriteBatch(GraphicsDevice);

                ballsimulation = new BallSimulation();
                ballview = new BallView(Content, ballsimulation, graphics);

            // TODO: use this.Content to load your game content here
        }
예제 #2
0
        public BallView(ContentManager content, BallSimulation ballsimunlation, GraphicsDeviceManager graphics)
        {
            b_ballsimunlation = ballsimunlation;

            ball = content.Load<Texture2D>("Ball.png");
            background = new Texture2D(graphics.GraphicsDevice, 1, 1);
            background.SetData<Color>(new Color[]
            {
                Color.White
            });
                //.Load<Texture2D>("Final.jpg");
            //amera = new Camera();
        }