示例#1
0
        public override void LoadGame()
        {
            //texture = TK.ContentPipeline.LoadTexture("Textures/char.png");
            //x = 0;
            //y = 0;
            //vX = 0;
            //vY = 0;
            //dX = 0.3f;
            //dY = 0.3f;
            //aX = 0.1f;
            //aY = 0.1f;
            //r = 0;
            //pX = 0;
            //pY = 0;
            //pvX = 0;
            //pvY = 0;
            //Loader.LoadTextures();
            //Loader.LoadSoundEffects();
            //Loader.LoadFonts();
            //gameplay.Load();

            _sprites.Add(new Player("char.png", 1));

            SpriteRender.SetView(0, 0, 800, 600, 1);
        }
示例#2
0
        public void DrawGame(TimeSpan delta)
        {
            SpriteRender.SetView((float)level.Player.X, (float)level.Player.Y, (float)800, (float)600, 5.0f);

            foreach (var body in world._bodies)
            {
                var sprite = body as Sprite;

                sprite.Draw();
            }

            hud.Draw();
        }