public override IDictionary <Type, Component> copyComponents(EntityRef other) { IDictionary <Type, Component> result = Maps.newHashMap(); foreach (Component c in other.iterateComponents()) { result[c.GetType()] = componentLibrary.copy(c); } return(result); }
public override EntityRef copy(EntityRef other) { if (!other.exists()) { return(EntityRef.NULL); } IList <Component> newEntityComponents = Lists.newArrayList(); foreach (Component c in other.iterateComponents()) { newEntityComponents.Add(componentLibrary.copy(c)); } return(create(newEntityComponents)); }