예제 #1
0
 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);
         }
     }
 }
예제 #2
0
 public override bool TryGetShape(string name, out TextureShape shape) => throw new InvalidOperationException();
예제 #3
0
 public override bool TryGetShape(string name, out TextureShape shape)
 {
     return(shapes.TryGetValue(name, out shape));
 }
예제 #4
0
 public abstract bool TryGetShape(string name, out TextureShape shape);
예제 #5
0
 public void AddShape(string name, TextureShape shape)
 {
     shapes.Add(name, shape);
 }