コード例 #1
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);

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

            ballSimulation = new BallSimulation();
            ballController = new BallController(graphics, Content, ballSimulation);
        }
コード例 #2
0
 public BallController(GraphicsDeviceManager graphics, ContentManager content, BallSimulation ballSimulation)
 {
     box = new Texture2D(graphics.GraphicsDevice, 1, 1);
     box.SetData<Color>(new Color[]
         {
             Color.White
         });
     camera = new Camera(graphics.GraphicsDevice.Viewport);
     globe = content.Load<Texture2D>("globe.png");
     m_ballSimulation = ballSimulation;
 }