public Player(string uName, BaseShip _ship, Weapon _weapon) { UserName = uName; Ship = _ship; Weapon = _weapon; Ship.weapon = Weapon; isActive = true; }
/// <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); font = Content.Load<SpriteFont>(@"SpriteFont\MessgaeFont"); _textureShip = Content.Load<Texture2D>(@"Assets\Textures\Ships\msShip"); _textureWeapon = Content.Load<Texture2D>(@"Assets\Textures\Weapons\missle"); _ms_textureS = Content.Load<Texture2D>(@"Assets\Textures\Ships\msShip"); _ms_textureW = Content.Load<Texture2D>(@"Assets\Textures\Weapons\missle"); _tc_textureS = Content.Load<Texture2D>(@"Assets\Textures\Ships\tcShip"); _tc_textureW = Content.Load<Texture2D>(@"Assets\Textures\Weapons\laser"); _ah_textureS = Content.Load<Texture2D>(@"Assests\Textures\Ships\AH_Ship"); _ah_textureW = Content.Load<Texture2D>(@"Assets\Textures\Weapons\bomb"); testWeapon = new Weapon("0", _textureWeapon, 20f, Vector2.Zero, Vector2.Zero, 0f, 20); testShip = new BaseShip("0", _textureShip, 5.0f); //ms_weapon = new MS_weapon("0", _textureWeapon, 20f, Vector2.Zero, Vector2.Zero, 0f, 20); ms_ship = new MS_ship("0", _textureShip, 7.0f); //ms_ship.weapon = ms_weapon; testShip.weapon = testWeapon; TC_ship = new TC_ship("2", _tc_textureS, 6.0f); AH_ship = new AH_Ship("3", _ah_textureS, 5.0f); // TODO: use this.Content to load your game content here }