Example #1
0
        public Form1()
        {
            InitializeComponent();
            FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            WindowState = System.Windows.Forms.FormWindowState.Maximized;

            frogger.Object.allObjects = new List<frogger.Object>();

            //graphics = new GraphicsDevice(this);
            //graphics.PreferredBackBufferWidth = width;
            //graphics.PreferredBackBufferHeight = height;

            //Content.RootDirectory = "Content";
            rand = new Random();
            sprites = new Dictionary<string, Texture2D>();

            Row.allRows = new List<Row>();
            new Row(64 * 0, 2.5f);
            new Row(64 * 1, 2);
            new Row(64 * 2, 1.5f);
            new Row(64 * 3, 1, Spawns.LOG);
            score = 0;
            lives = startingLives;
            //put the player at the bottom of the screen
            player = new Player(new Vector2(200, 256));
        }
Example #2
0
        public Form1()
        {
            InitializeComponent();
            FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            WindowState = System.Windows.Forms.FormWindowState.Maximized;

            frogger.Object.allObjects = new List<Object>();
            Row.allRows = new List<Row>();
            new Row(64 * 0, 2.5f);
            new Row(64 * 1, 2);
            new Row(64 * 2, 1.5f);
            new Row(64 * 3, 1, Spawns.LOG);
            score = 0;
            lives = startingLives;
            //put the player at the bottom of the screen
            player = new Player(new Vector2(200, 256));
        }
Example #3
0
        public Game1()
        {
            //make sure we initialize a static field first......
            frogger.Object.allObjects = new List<Object>();

            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth = width;
            graphics.PreferredBackBufferHeight = height;

            Content.RootDirectory = "Content";
            rand = new Random();
            sprites = new Dictionary<string, Texture2D>();

            Row.allRows = new List<Row>();
            new Row(64*0, 2.5f);
            new Row(64*1, 2);
            new Row(64*2, 1.5f);
            new Row(64*3, 1, Spawns.LOG);
            score = 0;
            lives = startingLives;
            //put the player at the bottom of the screen
            player = new Player(new Vector2(200, 256));
        }