Esempio n. 1
0
        protected override void LoadContent()
        {
            Camera = new Camera(_graphics);

            _spriteBatch = new SpriteBatch(GraphicsDevice);
            var texture = Content.Load <Texture2D>("wizardD");

            Globals.Red    = Content.Load <Texture2D>("Red");
            Globals.Purple = Content.Load <Texture2D>("Purple");
            Globals.Empty  = Content.Load <Texture2D>("EmptyBox");
            Globals.Filled = Content.Load <Texture2D>("FilledBox");

            BaseOverlay = new BaseOverlay();

            map.LoadMap();

            player = new Player(texture)
            {
                Input = new InputManager()
                {
                    Down      = Keys.S,
                    Interact  = Keys.F,
                    Inventory = Keys.Tab,
                    Left      = Keys.A,
                    Right     = Keys.D,
                    Up        = Keys.W
                },
                Position   = new Vector2(100, 100),
                Color      = Color.White,
                Speed      = 2,
                Collidable = false
            };


            // var player2 = new Player(texture)
            // {
            //     Input = new InputManager()
            //     {
            //         Down = Keys.Down,
            //         Interact = Keys.F,
            //         Inventory = Keys.Tab,
            //         Left = Keys.Left,
            //         Right = Keys.Right,
            //         Up = Keys.Up
            //     },
            //     Position = new Vector2(100, 100),
            //     Color = Color.White
            // };

            objects = new List <BaseGameObject>();
            //objects.Add(player2);
            foreach (var i in map.GetGameObjects())
            {
                objects.Add(i);
            }
            // TODO: use this.Content to load your game content here
        }