//private SpriteSheet _spriteSheet; public StarshipSN4(string craftDirectory, DVector2 position, DVector2 velocity, double payloadMass = 0, double propellantMass = 400000) : base(craftDirectory, position, velocity, payloadMass, propellantMass, null) { StageOffset = new DVector2(0, 0); Engines = new IEngine[1]; double engineOffsetX = 0; var offset = new DVector2(engineOffsetX * Width * 0.22, Height * 0.32); Engines[0] = new RaptorSL2019(0, this, offset); //_spriteSheet = new SpriteSheet("Textures/Spacecrafts/Its/scaledShip.png", 12, 12); string texturePath = "Its/StarshipSN4.png"; string fullPath = Path.Combine("Textures/Spacecrafts", texturePath); this.Texture = new Bitmap(fullPath); this.payloadMass = payloadMass; }
//private SpriteSheet _spriteSheet; public Starship(string craftDirectory, DVector2 position, DVector2 velocity, double payloadMass = 0, double propellantMass = 1200000, double dryMass = 120000, int engineCount = 6) : base(craftDirectory, position, velocity, payloadMass, propellantMass, null) { StageOffset = new DVector2(0, 0); Fins = new Fin[2]; Fins[0] = new Fin(this, new DVector2(0.0, -16.0), new DVector2(4.0, 6.7), 0, "Textures/Spacecrafts/ITS/Flap.png", -3); Fins[1] = new Fin(this, new DVector2(0.0, 17.2), new DVector2(4.1, 13.6), 0, "Textures/Spacecrafts/ITS/Flap.png", 3); Engines = new IEngine[engineCount]; for (int i = 0; i < 3; i++) { double theta = Math.PI / 2.0 + (Math.PI * i) / 1.5; double engineOffsetX = Math.Cos(theta); var offset = new DVector2(engineOffsetX * Width * 0.15, Height * 0.45); Engines[i] = new RaptorSL2019(i, this, offset); } if (engineCount == 6) { for (int i = 0; i < 3; i++) { double theta = (Math.PI * i) / 1.5 - Math.PI / 2.0; double engineOffsetX = Math.Cos(theta); var offset = new DVector2(engineOffsetX * Width * 0.35, Height * 0.45); Engines[i + 3] = new RaptorVac2019(i + 3, this, offset); } } //_spriteSheet = new SpriteSheet("Textures/Spacecrafts/Its/scaledShip.png", 12, 12); //string texturePath = "Its/Starship.png"; //string texturePath = "Its/StarshipTanker.png"; string texturePath = "Its/StarshipSN8.png"; string fullPath = Path.Combine("Textures/Spacecrafts", texturePath); this.Texture = new Bitmap(fullPath); _payloadMass = payloadMass; _dryMass = dryMass; }
//private SpriteSheet _spriteSheet; public SuperHeavy(string craftDirectory, DVector2 position, DVector2 velocity, double propellantMass = 3300000, double dryMass = 230000, int engineCount = 28, int thrust1 = 210, int thrust2 = 300) : base(craftDirectory, position, velocity, 0, propellantMass, "Its/SuperHeavy.png") { StageOffset = new DVector2(0, 59.0); double finOffset = -27.0; _gridFins = new[] { new SSGridFin(this, new DVector2(4.0, finOffset), true), new SSGridFin(this, new DVector2(-4.0, finOffset), false) }; Engines = new IEngine[engineCount]; int nGimbal = 7, nFixed = 24; switch (engineCount) { case 28: nGimbal = 8; nFixed = 20; break; } for (int i = 0; i < nGimbal; i++) { double theta = Math.PI / 2.0 + (Math.PI * i) / 3.5; double engineOffsetX = Math.Cos(theta); var offset = new DVector2(engineOffsetX * Width * 0.2, Height * 0.4); switch (thrust1) { case 210: Engines[i] = new RaptorSL300(i, this, offset); break; case 250: Engines[i] = new RaptorSL360(i, this, offset); break; case 300: Engines[i] = new RaptorSL430(i, this, offset); break; default: Engines[i] = new RaptorSL2019(i, this, offset); break; } } if (nFixed == 20) { for (int i = 0; i < nFixed; i++) { double theta = Math.PI / 2.0 + (Math.PI * i) / 6.0; double engineOffsetX = Math.Cos(theta); var offset = new DVector2(engineOffsetX * Width * 0.35, Height * 0.4); Engines[i + 8] = new RaptorSL430(i + 8, this, offset); } } else { if (engineCount >= 13) { for (int i = 0; i < 6; i++) { double theta = Math.PI / 2.0 + (Math.PI * i) / 10.0; double engineOffsetX = Math.Cos(theta); var offset = new DVector2(engineOffsetX * Width * 0.3, Height * 0.4); switch (thrust2) { case 250: Engines[i + 7] = new RaptorSL360(i + 7, this, offset); break; case 300: Engines[i + 7] = new RaptorSL430(i + 7, this, offset); break; default: Engines[i + 7] = new RaptorSL2019(i + 7, this, offset); break; } } } if (engineCount >= 19) { for (int i = 6; i < 12; i++) { double theta = Math.PI / 2.0 + (Math.PI * i) / 6.0; double engineOffsetX = Math.Cos(theta); var offset = new DVector2(engineOffsetX * Width * 0.3, Height * 0.4); switch (thrust2) { case 250: Engines[i + 7] = new RaptorSL360(i + 7, this, offset); break; case 300: Engines[i + 7] = new RaptorSL430(i + 7, this, offset); break; default: Engines[i + 7] = new RaptorSL2019(i + 7, this, offset); break; } } } if (engineCount >= 25) { if (engineCount >= 31) { for (int i = 0; i < 12; i++) { double theta = Math.PI / 2.0 + (Math.PI * i) / 6.0; double engineOffsetX = Math.Cos(theta); var offset = new DVector2(engineOffsetX * Width * 0.35, Height * 0.4); switch (thrust2) { case 250: Engines[i + 19] = new RaptorSL360(i + 19, this, offset); break; case 300: Engines[i + 19] = new RaptorSL430(i + 19, this, offset); break; default: Engines[i + 19] = new RaptorSL2019(i + 19, this, offset); break; } } if (engineCount >= 37) { for (int i = 0; i < 6; i++) { double theta = Math.PI / 2.0 + (Math.PI * i) / 3.0; double engineOffsetX = Math.Cos(theta); var offset = new DVector2(engineOffsetX * Width * 0.4, Height * 0.4); switch (thrust2) { case 250: Engines[i + 31] = new RaptorSL360(i + 31, this, offset); break; case 300: Engines[i + 31] = new RaptorSL430(i + 31, this, offset); break; default: Engines[i + 31] = new RaptorSL2019(i + 31, this, offset); break; } } } } else { for (int i = 0; i < 6; i++) { double theta = Math.PI / 2.0 + (Math.PI * i) / 3.0; double engineOffsetX = Math.Cos(theta); var offset = new DVector2(engineOffsetX * Width * 0.35, Height * 0.4); switch (thrust1) { case 250: Engines[i + 19] = new RaptorSL360(i + 19, this, offset); break; case 300: Engines[i + 19] = new RaptorSL430(i + 19, this, offset); break; default: Engines[i + 19] = new RaptorSL2019(i + 19, this, offset); break; } } } } } //_spriteSheet = new SpriteSheet("Textures/Spacecraft/Its/booster.png", 4, 12); string texturePath = "Its/SuperHeavy.png"; string fullPath = Path.Combine("Textures/Spacecrafts", texturePath); this.Texture = new Bitmap(fullPath); _dryMass = dryMass; }