Esempio n. 1
0
        public void OnConfigureObjectRequest(SceneObjects.PrefabTemplate ao)
        {
            RecipeDataAddon recipe = FindRecipe(ao.Type);

            if (recipe != null)
            {
                ao.DataObjects.AddDataAddon("recipes", recipe);
            }
        }
Esempio n. 2
0
 public void OnConfigure()
 {
     //receptury
     if (_recipes.Count == 0)
     {
         XmlDataInfo recipesInfo = Utils.LoadXmlAssetFile("data/recipes", "recipes");
         if (recipesInfo != null)
         {
             foreach (XElement element in recipesInfo.MainNodeElements)
             {
                 RecipeDataAddon nowaReceptura = new RecipeDataAddon();
                 nowaReceptura.LoadData(recipesInfo, element);
                 _recipes.Add(nowaReceptura.Type, nowaReceptura);
             }
         }
     }
 }