示例#1
0
        public override void Initialize()
        {
            _camera = new FirstPersonCamera(Game);
            _camera.Initialize();
            _camera.Position = Vector3.Zero;
            _camera.LookAt(Vector3.Zero);
            _cameraController = new FirstPersonCameraController(Game);
            _cameraController.Initialize();
            Game.Camera = _camera;

            Game.IsMouseVisible = true;

            _blockSelection = new BlockSelection(Game, _game.GameClient.World);
            _blockSelection.Initialize();

            _player = new Player(Game, this, _game.GameClient.World, _blockSelection, new Vector3(30f, 100f, 30f));
            _player.Initialize();

            _spriteBatch = new SpriteBatch(Game.GraphicsDevice);

            _blockPicker = new BlockPicker(Game, _spriteBatch);
            _blockPicker.Initialize();

            _particleManager = new ParticleManager(Game);
            BubbleParticleSystem pickupParticles = new BubbleParticleSystem(Game, Game.Content);

            pickupParticles.Initialize();
            _particleManager.ParticleSystems.Add(pickupParticles);


            _spriteFont = Game.Content.Load <SpriteFont>("Fonts\\console");

            _debugInfo = new DebugInfo(Game, _game.GameClient.World);


            _particleManager.ParticleEmitters.Add(new ParticleEmitter(_particleManager.ParticleSystems[0], 50, new Vector3(5, 3, 5)));
            _particleManager.ParticleEmitters.Add(new ParticleEmitter(_particleManager.ParticleSystems[0], 50, new Vector3(15, 3, 15)));

            //_weaponManager = new WeaponManager(_game, _game.GameClient.World, _player);
            //_weaponManager.Initialize();
        }