Beispiel #1
0
 protected override void Initialize()
 {
     if (_content == null)
     {
         _content = new PlainContentManager(Services);
     }
     if (_renderer == null)
     {
         _renderer = new SpriteBatchRenderer();
     }
     _renderer.GraphicsDeviceService = (IGraphicsDeviceService)Services.GetService(typeof(IGraphicsDeviceService));
     if (_circle == null)
     {
         try
         {
             _circle = new FilledEllipse(_content, GraphicsDeviceManager)
             {
                 Gradient = 2,
                 Color    = Color.SlateBlue * 0.5f
             };
         }
         catch (Exception ex)
         {
             Console.WriteLine("Failed initializing ellipse: " + ex);
         }
     }
     LoadContent();
 }
 protected override void Initialize()
 {
     if (_content == null)
     {
         _content = new PlainContentManager(Services);
     }
     if (_renderer == null)
     {
         _renderer = new SpriteBatchRenderer();
     }
     _renderer.GraphicsDeviceService = (IGraphicsDeviceService)Services.GetService(typeof(IGraphicsDeviceService));
     if (!string.IsNullOrWhiteSpace(_assetName) && _effect == null)
     {
         LoadContent();
     }
 }