Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CreateAssetServices()

static void Terraria.Initializers.AssetInitializer.CreateAssetServices ( GameServiceContainer services)
inlinestatic

Definition at line 20 of file AssetInitializer.cs.

21 {
22 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
23 //IL_0006: Expected O, but got Unknown
24 //IL_0012: Unknown result type (might be due to invalid IL or missing references)
25 //IL_002a: Expected O, but got Unknown
26 //IL_002c: Unknown result type (might be due to invalid IL or missing references)
27 //IL_0044: Expected O, but got Unknown
28 //IL_0047: Unknown result type (might be due to invalid IL or missing references)
29 //IL_004d: Expected O, but got Unknown
30 //IL_007e: Unknown result type (might be due to invalid IL or missing references)
31 //IL_0089: Expected O, but got Unknown
32 //IL_0084: Unknown result type (might be due to invalid IL or missing references)
33 //IL_008a: Expected O, but got Unknown
36 val.RegisterReader((IAssetReader)new XnbReader((IServiceProvider)services), new string[1] { ".xnb" });
37 AsyncAssetLoader val2 = new AsyncAssetLoader(val, 20);
38 val2.RequireTypeCreationOnTransfer(typeof(Texture2D));
39 val2.RequireTypeCreationOnTransfer(typeof(DynamicSpriteFont));
40 val2.RequireTypeCreationOnTransfer(typeof(SpriteFont));
41 IAssetRepository provider = (IAssetRepository)new AssetRepository((IAssetLoader)new AssetLoader(val), (IAsyncAssetLoader)(object)val2);
42 services.AddService(typeof(AssetReaderCollection), val);
43 services.AddService(typeof(IAssetRepository), provider);
44 }
void RegisterReader(IAssetReader reader, params string[] extensions)
Async loading has been fully integrated into AssetRepository Assets which are asynchronously loaded w...

References Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService.GraphicsDevice, and ReLogic.Content.AssetReaderCollection.RegisterReader().

Referenced by Terraria.Main.LoadContent().