Example #1
0
        public Player(ShotManager shotManager)
        {
            // TODO: Complete member initialization
            this.shotManager = shotManager;

            sprint = 100;
            steps = 3;
            Draaipunt = new Vector2(18, 27);
        }
Example #2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            shotManager = new ShotManager(Content.Load<Texture2D>("bullet"));
            Player1 = new Player(shotManager);

            Player1.Position = new Vector2(200, 200);
            Player1.Color = Color.White;

            Joe1 = new Zombie(Player1);

            Joe1.Position = new Vector2(200, 200);
            Joe1.Color = Color.White;
            Joe1.Type = "Joe";

            Crosshair1 = new Crosshair();

            Crosshair1.Position = new Vector2(400,400);
            Crosshair1.Color = Color.White;

            base.Initialize();
        }