public void Customize(CharacterInfo customizations, ContentManager contentLoader) { foreach (KeyValuePair <Type, Behavior> behavior in Behaviors) { ICustomizable candidate = behavior.Value as ICustomizable; if (candidate != null) { candidate.Customize(customizations, contentLoader); } } }
public void Customize(CharacterInfo customizations, ContentManager contentLoader) { foreach (KeyValuePair <ActorComponent.ComponentType, ActorComponent> kvp in mComponents) { ICustomizable candidate = kvp.Value as ICustomizable; if (candidate != null) { candidate.Customize(customizations, contentLoader); } } }