コード例 #1
0
ファイル: BounceGame.cs プロジェクト: zfogg/Bounce
        protected override void Initialize()
        {
            ContentManager.RootDirectory = "Content";
            graphics.PreferredBackBufferWidth = 800;
            graphics.PreferredBackBufferHeight = 480;
            graphics.ApplyChanges();
            IsMouseVisible = true;

            camera = new Camera2D(GraphicsDevice, input);
            this.Services.AddService(camera.GetType(), camera);

            base.Initialize();
        }
コード例 #2
0
ファイル: SceneStack.cs プロジェクト: zfogg/Bounce
 protected override void LoadContent()
 {
     camera = (Camera2D)Game.Services.GetService(typeof(Camera2D));
     spriteBatch = new SpriteBatch(GraphicsDevice);
     base.LoadContent();
 }