Exemplo n.º 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;

            _player = new Player(Game, this, _game.GameClient.World, new Vector3(30f, 150f, 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");

            _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();
        }
 public void Initialize()
 {
     _playerVelocity       = Vector3.Zero;
     _bubbleParticleSystem = new BubbleParticleSystem(_game, _game.Content);
     _bubbleParticleSystem.Initialize();
     _snowParticleSystem = new SnowParticleSystem(_game, _game.Content);
     _snowParticleSystem.Initialize();
 }
Exemplo n.º 3
0
        public void Initialize()
        {
            _playerVelocity       = Vector3.Zero;
            _bubbleParticleSystem = new BubbleParticleSystem(_game, _game.Content);
            _bubbleParticleSystem.Initialize();
            _snowParticleSystem = new SnowParticleSystem(_game, _game.Content);
            _snowParticleSystem.Initialize();

            Camera.LeftRightRotation = 3.946f;
            Camera.UpDownRotation    = -1.124f;
            _elapsedTime             = 0.0f;
            _onBlockSlection         = false;
        }