protected override void Initialize()
        {
            base.Initialize();

            Graphics.PreferMultiSampling       = true;
            Graphics.PreferredBackBufferWidth  = 1280;
            Graphics.PreferredBackBufferHeight = 720;
            Graphics.ApplyChanges();

            Render.Initialize(GraphicsDevice);
            KInput.Initialize();
            MInput.Initialize();

            World = new World();
        }
Exemple #2
0
        public void Update()
        {
            MInput.Update();
            KInput.Update();

            if (!sorted)
            {
                Entities.Sort(this);
                sorted = true;
            }

            //updating in 3 steps
            Entities.ForEach((o) => o.BeforeUpdate());
            Entities.ForEach((o) => o.Update());
            Entities.ForEach((o) => o.AfterUpdate());
        }