public void LoadData() { fldata.LoadData(); IntroScenes = new List <GameData.IntroScene>(); foreach (var b in fldata.Universe.Bases) { if (b.Nickname.StartsWith("intro", StringComparison.InvariantCultureIgnoreCase)) { foreach (var room in b.Rooms) { if (room.Nickname == b.StartRoom) { var isc = new GameData.IntroScene(); isc.Scripts = new List <ThnScript>(); foreach (var p in room.SceneScripts) { var path = Compatibility.VFS.GetPath(fldata.Freelancer.DataPath + p); isc.Scripts.Add(new ThnScript(path)); } isc.Music = room.Music; IntroScenes.Add(isc); } } } } if (resource != null) { resource.AddPreload( fldata.EffectShapes.Files.Select(txmfile => Compatibility.VFS.GetPath(fldata.Freelancer.DataPath + txmfile)) ); foreach (var shape in fldata.EffectShapes.Shapes) { var s = new TextureShape() { Texture = shape.Value.TextureName, Nickname = shape.Value.ShapeName, Dimensions = shape.Value.Dimensions }; resource.AddShape(shape.Key, s); } } }
public override bool TryGetShape(string name, out TextureShape shape) => throw new InvalidOperationException();
public override bool TryGetShape(string name, out TextureShape shape) { return(shapes.TryGetValue(name, out shape)); }
public abstract bool TryGetShape(string name, out TextureShape shape);
public void AddShape(string name, TextureShape shape) { shapes.Add(name, shape); }