public Ship(Screens.GameScreen gameScreen, Vector3 respawnPoint, Screens.GameplayScreen gpScreen, Player player) : base(gameScreen, 10f, 0d, 8d, respawnPoint) { // ship should know who owns it _owner = player; gameplayScreen = gpScreen; //The follow code is to test the weapons _frontWeapon = new TestGun(gameScreen, this); _rightWeapon = new RemoteMineLauncher(gameScreen, this); _leftWeapon = new TestGun(gameScreen, this); _backWeapon = new TestGun(gameScreen, this); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); Player1 = new Player(this,Content.Load<Texture2D>("Texture\\Il-Wrath"), Content.Load<Texture2D>("Texture\\planet"),WeaponTypes.Basic); AstroidTexture = Content.Load<Texture2D>("Texture\\Asteroid"); BackgroundTexture = Content.Load<Texture2D>("Texture\\Space_BackGround"); background = new Background(BackgroundTexture,graphics.GraphicsDevice.PresentationParameters.BackBufferWidth, graphics.GraphicsDevice.PresentationParameters.BackBufferHeight); for (int i = 0; i < 10; i++) { myAstroids.Add(new Asteroid(this, AstroidTexture, new Vector2((float)rand.NextDouble() * graphics.GraphicsDevice.PresentationParameters.BackBufferWidth, (float)rand.NextDouble() * graphics.GraphicsDevice.PresentationParameters.BackBufferWidth), 1f, 0.0f, new Vector2(AstroidTexture.Width / 2, AstroidTexture.Height / 2), spriteBatch, 10f, 10f, 4f)); } }
public CommonVariablesPlayer(Player player) { }