/// <summary> /// Adds the asset. /// </summary> /// <param name="tag">The asset identifier.</param> /// <param name="position">The position.</param> /// <param name="rotation">The rotation.</param> /// <param name="scale">The scale.</param> public ScenarioAsset AddAsset(string tag, Vector position, Vector rotation, Vector scale) { ScenarioAsset asset = new ScenarioAsset(tag, position, rotation, scale); this._scenarioAssets.Add(asset); return(asset); }
/// <summary> /// Removes the asset. /// </summary> /// <param name="tag">The tag.</param> /// <exception cref="ScenarioManagementDomainException">There is no asset with the given tag.</exception> public void RemoveAsset(string tag) { ScenarioAsset asset = this._scenarioAssets.FirstOrDefault(a => a.Tag == tag); if (asset == null) { throw new ScenarioManagementDomainException("There is no asset with the given tag."); } this._scenarioAssets.Remove(asset); }