コード例 #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);
 }