protected SpaceCraftBase(string craftDirectory, DVector2 position, DVector2 velocity, double payloadMass, double propellantMass, string texturePath, ReEntryFlame entryFlame = null) : base(position, velocity, -Math.PI * 0.5) { CraftDirectory = craftDirectory; Children = new List <ISpaceCraft>(); if (!string.IsNullOrEmpty(texturePath)) { string fullPath = Path.Combine("Textures/Spacecrafts", texturePath); if (!File.Exists(fullPath)) { throw new FileNotFoundException("Could not find texture!", fullPath); } Texture = new Bitmap(fullPath); } PayloadMass = payloadMass; PropellantMass = propellantMass; EntryFlame = entryFlame; MissionName = craftDirectory.Substring(craftDirectory.LastIndexOf('\\') + 1); _launchTrails = new Dictionary <string, LaunchTrail>(); _cachedRelativeVelocity = DVector2.Zero; }
protected SpaceCraftBase(DVector2 position, DVector2 velocity, double propellantMass, string texturePath, ReEntryFlame entryFlame = null) : base(position, velocity, -Math.PI * 0.5) { Children = new List <ISpaceCraft>(); Texture = new Bitmap(texturePath); PropellantMass = propellantMass; EntryFlame = entryFlame; }
protected SpaceCraftBase(string craftDirectory, DVector2 position, DVector2 velocity, double propellantMass, string texturePath, ReEntryFlame entryFlame = null) : base(position, velocity, -Math.PI * 0.5) { CraftDirectory = craftDirectory; Children = new List <ISpaceCraft>(); Texture = new Bitmap(texturePath); PropellantMass = propellantMass; EntryFlame = entryFlame; MissionName = craftDirectory.Substring(craftDirectory.LastIndexOf('\\') + 1); _launchTrail = new LaunchTrail(); }
protected SpaceCraftBase(string craftDirectory, DVector2 position, DVector2 velocity, double payloadMass, double propellantMass, string texturePath, ReEntryFlame entryFlame = null) : base(position, velocity, -Math.PI * 0.5) { CraftDirectory = craftDirectory; Children = new List<ISpaceCraft>(); if (!string.IsNullOrEmpty(texturePath)) { Texture = new Bitmap(texturePath); } PropellantMass = propellantMass; EntryFlame = entryFlame; MissionName = craftDirectory.Substring(craftDirectory.LastIndexOf('\\') + 1); _launchTrail = new LaunchTrail(); }