Ejemplo n.º 1
0
        public void Initialize()
        {
            base.Initialize(InstanceName);

            canvasBackground = ServiceManager.Instance.GetService<CanvasBackground>(ServiceType.CanvasBackground);
            _lastGiggle = DateTime.Now;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            try
            {
                foreach (IService service in serviceManager)
                {
                    service.Initialize();
                }

                foreach (IInputDevice inputDevice in inputDevices)
                {
                    inputDevice.Initialize();
                }

                nextTimeToKillPaintingStrokes = DateTime.Now + TimeBetweenKillingPaintingStrokes;
            }
            catch (Exception e)
            {
                serviceManager.GetService<ILogger>(ServiceType.Logger).Log(e);
            }

            effectPost = Content.Load<Effect>("GrayscalePixelShader");
            DisplayBlackAndWhite = false;

            _canvasBackground = serviceManager.GetService<CanvasBackground>(ServiceType.CanvasBackground);

            base.Initialize();
        }
Ejemplo n.º 3
0
        public void Initialize()
        {
            previousState = Keyboard.GetState();

            _canvasBackground = ServiceManager.Instance.GetService<CanvasBackground>(ServiceType.CanvasBackground);
        }