Пример #1
0
 private void OnAssetRequested(object?sender, AssetRequestedEventArgs e)
 {
     if (e.Name.IsEquivalentTo(assetName))
     {
         e.LoadFromModFile <Texture2D>(iconPath, AssetLoadPriority.Low);
     }
 }
Пример #2
0
 private static void Load(AssetRequestedEventArgs e)
 {
     if (e.NameWithoutLocale.IsEquivalentTo(AssetManager.GameContentSpriteSheetPath))
     {
         e.LoadFromModFile <Texture2D>(
             relativePath: $"{AssetManager.LocalSpriteSheetPath}.png",
             priority: AssetLoadPriority.Exclusive);
     }
     if (e.NameWithoutLocale.IsEquivalentTo(AssetManager.GameContentIngredientBuffDataPath))
     {
         e.LoadFromModFile <Dictionary <string, string> >(
             relativePath: $"{AssetManager.LocalIngredientBuffDataPath}.json",
             priority: AssetLoadPriority.Exclusive);
     }
     if (e.NameWithoutLocale.IsEquivalentTo(AssetManager.GameContentBushSpriteSheetPath))
     {
         e.LoadFromModFile <Texture2D>(
             relativePath: $"{AssetManager.LocalBushSpriteSheetPath}.png",
             priority: AssetLoadPriority.Exclusive);
     }
     if (e.NameWithoutLocale.IsEquivalentTo(AssetManager.GameContentDefinitionsPath))
     {
         e.LoadFromModFile <Dictionary <string, List <string> > >(
             relativePath: $"{AssetManager.LocalDefinitionsPath}.json",
             priority: AssetLoadPriority.Exclusive);
     }
     if (e.NameWithoutLocale.IsEquivalentTo(AssetManager.GameContentSkillRecipeTablePath))
     {
         e.LoadFromModFile <Dictionary <string, List <string> > >(
             relativePath: $"{AssetManager.LocalSkillRecipeTablePath}.json",
             priority: AssetLoadPriority.Exclusive);
     }
     if (e.NameWithoutLocale.IsEquivalentTo(AssetManager.GameContentSkillValuesPath))
     {
         e.LoadFromModFile <Dictionary <string, string> >(
             relativePath: $"{AssetManager.LocalSkillValuesPath}.json",
             priority: AssetLoadPriority.Exclusive);
     }
     if (e.NameWithoutLocale.IsEquivalentTo(AssetManager.GameContentContextTagDataPath))
     {
         e.LoadFromModFile <Dictionary <string, string> >(
             relativePath: $"{AssetManager.LocalContextTagDataPath}.json",
             priority: AssetLoadPriority.Exclusive);
     }
 }