예제 #1
0
        public BallView(SpriteBatch spriteBatch, Camera camera, ContentManager content, BallSimulation ballSimulation)
        {
            this.spriteBatch = spriteBatch;
            this.camera = camera;
            this.ballSimulation = ballSimulation;

            LoadGraphics(content);
        }
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            //makes the mouse visible on the game screen
            this.IsMouseVisible = true;

            gameController = new GameController(ExplosionScale, Content);

            ballSimulation = new BallSimulation();
            mainView = new MainView(GraphicsDevice, Content, ballSimulation, ExplosionScale);
        }
예제 #3
0
        public MainView(GraphicsDevice device, ContentManager content, BallSimulation ballSimulation, float ExplosionScale)
        {
            this.device = device;
            spriteBatch = new SpriteBatch(device);
            camera = new Camera(device);

            explosionView = new ExplosionView(spriteBatch, camera, content);
            ballView = new BallView(spriteBatch, camera, content, ballSimulation);

            this.ExplosionScale = ExplosionScale;

            aim = content.Load<Texture2D>("aim.png");
        }