private static void addComponentsAttributes(EntityInfo entityInfo)
 {
     RepeatedAttributesController repeatedAttributesController = new RepeatedAttributesController();
     foreach (Dictionary<string, object> componentAttributes in entityInfo.getComponentsInfo)
     {
         foreach (KeyValuePair<string, object> attribute in componentAttributes)
         {
             if (!repeatedAttributesController.isRepeated(attribute.Key))
                 entity += "\n\t" + attribute.Key + " = " + TranslatorsDictionary.getTranslatorOf(attribute.Value.GetType()).translate(attribute.Value) + ",";
             else
             {
                 resolveConflicts(attribute);
                 Debug.Log("Atributo " + attribute.Key + " esta repetido en el game object " + entityInfo.getName);
             }
         }
     }
 }
Exemple #2
0
        private static void addComponentsAttributes(EntityInfo entityInfo)
        {
            RepeatedAttributesController repeatedAttributesController = new RepeatedAttributesController();

            foreach (Dictionary <string, object> componentAttributes in entityInfo.getComponentsInfo)
            {
                foreach (KeyValuePair <string, object> attribute in componentAttributes)
                {
                    if (!repeatedAttributesController.isRepeated(attribute.Key))
                    {
                        entity += "\n\t" + attribute.Key + " = " + TranslatorsDictionary.getTranslatorOf(attribute.Value.GetType()).translate(attribute.Value) + ",";
                    }
                    else
                    {
                        resolveConflicts(attribute);
                        Debug.Log("Atributo " + attribute.Key + " esta repetido en el game object " + entityInfo.getName);
                    }
                }
            }
        }