Ejemplo n.º 1
0
 public GameVideo(Video video)
 {
     _video = video;
      _videoPlayer = new VideoPlayer();
      kinput = new KeyboardInput();
      gInput = new GamePadInput();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 public GameScreen(Texture2D[] panels, Texture2D[] backgroundAssets)
 {
     _panels = panels;
     CurrentState = State.Hidden;
     MenuEntryList = new List<MenuEntry>();
     InputActionsMenuList = new List<InputActionMenu>();
     _keyboardInput = new KeyboardInput();
     _defaultSpacing = 0f;
     _backgroundAssets = backgroundAssets;
     _gamepadInput = new GamePadInput();
 }
Ejemplo n.º 3
0
        public SpawnerManager(GraphicsDevice device, List<ShipProfile> shipProfiles, SpriteFont font, Texture2D[] arrows, Texture2D[] bars, Texture2D overlay, Texture2D[] shipImages, int amtShips)
        {
            _device = device;
            _shipProfiles = shipProfiles;
            UIFont = font;
            UIArrows = arrows;
            UIBars = bars;
            UIOverlay = overlay;
            UIShipImages = shipImages;
            _amtShips = amtShips;

            _selected = 0;
            _keyboardInput = new KeyboardInput();
            _gamePadInput = new GamePadInput();
        }
Ejemplo n.º 4
0
        public PlayerShip(List<Collidable> collidableRef, CollidableType type, float boundingRadius, Model model, Vector3 shipPosition, GraphicsDevice device, Vector3 cameraFollowPosition, float scale, float minShipSpeed, float maxShipSpeed, float acceleration, float turningSpeed,
            float maxTurningSpeed, float minTurningSpeed, WeaponSystem2D weaponSystem2D, MissleSystem2D missleSystem2D, SpawnerManager spawnerManager, PlayerConfig[] playerConfigurations)
        {
            CollidableReference = collidableRef;

            _shipModel = new BasicModel(model, scale);

            ShipWorld = Matrix.CreateTranslation(shipPosition) * Matrix.CreateScale(scale);
            _dockingPosition = shipPosition;
            ShipPosition = shipPosition;

            _shipRotation = Quaternion.Identity;

            Camera = new Camera(device, cameraFollowPosition);

            _keyboard = new KeyboardInput();

            _minShipSpeed = minShipSpeed;
            _maxShipSpeed = maxShipSpeed;
            _acceleration = acceleration;
            _turningSpeed = turningSpeed;
            _gamePadInput = new GamePadInput();

            _weaponSystem2D = weaponSystem2D;
            _device = device;
            _shipRotation.Normalize();

            //Collidable Properties
            this.CollidableType = type;
            this.BoundingSphereRadius = boundingRadius;

            _maxTurningSpeed = maxTurningSpeed;
            _minTurningSpeed = minTurningSpeed;

            Life = 0;

            _soundDump = new List<Sound>();

            spawnerManager.Selected += (object sender, EventArgs args) =>
                {
                    SpawnerManager SM = sender as SpawnerManager;
                    Spawn(SM._selected);
                };

            _missleSystem2D = missleSystem2D;

            _playerConfigurations = playerConfigurations;
        }