Esempio n. 1
0
 public async Task <IAsset> Load(string name, IReadableSerializedAsset input, IAssetManager assetManager)
 {
     return(new ModelAsset(
                _modelSerializer,
                name,
                input.GetByteArray("Data")));
 }
 public async Task <IAsset> Load(string name, IReadableSerializedAsset input, IAssetManager assetManager)
 {
     return(new UberEffectAsset(
                _kernel,
                _assetContentManager,
                _rawLaunchArguments,
                name,
                input.GetByteArray("Data")));
 }
Esempio n. 3
0
 public async Task <IAsset> Load(string name, IReadableSerializedAsset input, IAssetManager assetManager)
 {
     return(new TextureAsset(
                _assetContentManager,
                name,
                input.GetByteArray("Data"),
                input.GetInt32("OriginalWidth"),
                input.GetInt32("OriginalHeight")));
 }
Esempio n. 4
0
 public async Task <IAsset> Load(string name, IReadableSerializedAsset input, IAssetManager assetManager)
 {
     return(new FontAsset(
                _assetContentManager,
                name,
                input.GetString("FontName"),
                input.GetFloat("FontSize"),
                input.GetBoolean("UseKerning"),
                input.GetFloat("Spacing"),
                input.GetByteArray("Data")));
 }
 public static bool GetBoolean(this IReadableSerializedAsset asset, string property)
 {
     return(BitConverter.ToBoolean(asset.GetByteArray(property), 0));
 }
 public static float GetFloat(this IReadableSerializedAsset asset, string property)
 {
     return(BitConverter.ToSingle(asset.GetByteArray(property), 0));
 }
 public static Int32 GetInt32(this IReadableSerializedAsset asset, string property)
 {
     return(BitConverter.ToInt32(asset.GetByteArray(property), 0));
 }
 public static string GetString(this IReadableSerializedAsset asset, string property)
 {
     return(Encoding.UTF8.GetString(asset.GetByteArray(property)));
 }