Ejemplo n.º 1
0
 public RectangleChecker(Game game, Tint colorTint)
     : base(game, 0.2f, 1.0f, 1.0f)
 {
     this.colorTint = colorTint;
     cam            = (GameCamera)game.Services.GetService(typeof(BasicCamera));
     textureLibrary = (TexturesLibrary)game.Services.GetService(typeof(TexturesLibrary));
     checkerEffect  = new PhongEffect(game, colorTint);
     CheckerEffect.setOtherParams();
     LoadContent();
     generateChecker();
 }
Ejemplo n.º 2
0
 protected override void Initialize()
 {
     cam = new GameCamera(this, graphics.GraphicsDevice.Viewport);
     Services.AddService(typeof(BasicCamera), cam);
     spriteBatch = new SpriteBatch(GraphicsDevice);
     Services.AddService(typeof(SpriteBatch), spriteBatch);
     texturesLibrary = new TexturesLibrary(Content);
     Services.AddService(typeof(TexturesLibrary), texturesLibrary);
     msc = new MainMenuScene(this);
     Components.Add(bsc);
     Components.Add(msc);
     //to control the order of operations
     Components.Add(cam);
     msc.showScene();
     base.Initialize();
 }
Ejemplo n.º 3
0
 public PhongEffect(Game game, BorderType borderType)
     : base(game, borderType)
 {
     Effect         = Game.Content.Load <Effect>("Effects/Phong").Clone(game.GraphicsDevice);
     textureLibrary = (TexturesLibrary)game.Services.GetService(typeof(TexturesLibrary));
 }