コード例 #1
0
 public SceneManager(Game game)
 {
     this.game = game;
     batch     = new SpriteBatch(game.GraphicsDevice);
     Camera    = new SceneCameraComponent(game);
     game.Components.Add(Camera);
 }
コード例 #2
0
 public SceneNode(Game game, string TextureName, Vector2 startingPosition)
 {
     this.game      = game;
     camera         = (SceneCameraComponent)game.Services.GetService(typeof(ISceneCameraComponent));
     ScreenCentre.X = game.GraphicsDevice.Viewport.Width / 2;
     ScreenCentre.Y = game.GraphicsDevice.Viewport.Height / 2;
     textureName    = TextureName;
     Position       = startingPosition;
     LoadContent();
 }