Example #1
0
        public MyGame()
        {
            // Creates a graphics manager. This is mandatory.
            graphicsDeviceManager = new GraphicsDeviceManager(this);

            //graphicsDeviceManager.IsFullScreen = true;

            graphicsDeviceManager.PreferredBackBufferHeight = _windowHeight;
            graphicsDeviceManager.PreferredBackBufferWidth = _windowWidth;

            // Setup the relative directory to the executable directory
            // for loading contents with the ContentManager
            Content.RootDirectory = "Content";

            // Initialize input keyboard system
            keyboard = new KeyboardManager(this);

            // Initialize input mouse system
            mouse = new MouseManager(this);

            audiop = new AudioPlayer("rocket");
        }
Example #2
0
 public Hero(float x, float y, int width, int height, float speed, List<string> textureName, MyGame game)
     : base(x, y, width, height, textureName, game)
 {
     this._speed = speed;
     audiop = new AudioPlayer("jump");
 }