Exemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new Launcher());

            //Launcher l = new Launcher();
            //if (l.ShowDialog() == DialogResult.OK)
            {
                using (var game = new Game(new VideoMode(800, 600), false))// l.Mode, l.Fullscreen))
                {
                    using (var loop = new nms.GameLoop(game))
                    {
                        Loop.DoLoop(loop);
                    }
                }
            }
        }
Exemplo n.º 2
0
        public Player(Game g, GameLoop loop, Layer.ObjectData da)
        {
            this.loop = loop;
            anims     = new AnimationGroup[] {
                new AnimationGroup {
                    anIdle    = new Animation(g, Constants.kAnimationFile, "idleLeft"),
                    anMove    = new Animation(g, Constants.kAnimationFile, "moveLeft"),
                    anJumping = new Animation(g, Constants.kAnimationFile, "jumpingLeft"),
                    anFalling = new Animation(g, Constants.kAnimationFile, "fallingLeft")
                },
                new AnimationGroup {
                    anIdle    = new Animation(g, Constants.kAnimationFile, "idleRight"),
                    anMove    = new Animation(g, Constants.kAnimationFile, "moveRight"),
                    anJumping = new Animation(g, Constants.kAnimationFile, "jumpingRight"),
                    anFalling = new Animation(g, Constants.kAnimationFile, "fallingRight")
                }
            };

            pos = da.pos;
            //font = new Font("cheeseburger.ttf");
            //text = new String2D("", Font.DefaultFont);
        }