/// <summary> /// Performs Set negation between this DrawableSet and the DrawabelSet specified in the parameter. While /// two sets should never share the same GameDrawableInstance, they may share the same IGameDrawable which would /// be wrapped by an GameDrawableInstance. If the DrawableSet specified in the parameter contains IGameDrawables /// within the same state as this DrawableSet, then associated GameDrawableInstance's are removed. /// </summary> public void Remove(DrawableSet drawableSet) { foreach (string state in drawableSet.GetStates()) { foreach (GameDrawableInstance instance in drawableSet.GetByState(state)) { Remove(instance.Drawable, state); } } }
/// <summary> /// Performs a Set union operation between this DrawableSet and the DrawableSet specified in the parameter. /// It is important to note that any IGameDrawables newly created in this DrawableSet are wrapped around a /// *new* GameDrawableInstance in order to allow properties to be set independently for each one. /// </summary> public void Union(DrawableSet drawableSet) { foreach (string state in drawableSet.GetStates()) { foreach (GameDrawableInstance instance in drawableSet.GetByState(state)) { GameDrawableInstance copiedInstance = Add(state, instance.Drawable, instance._associatedGroup); copiedInstance.Layer = instance.Layer; copiedInstance.Offset = instance.Offset; copiedInstance.Rotation = instance.Rotation; copiedInstance.Visible = instance.Visible; } } }
/// <summary> /// Performs a Set union operation between this DrawableSet and the DrawableSet specified in the parameter. /// It is important to note that any IGameDrawables newly created in this DrawableSet are wrapped around a /// *new* GameDrawableInstance in order to allow properties to be set independently for each one. /// </summary> public void Union(DrawableSet drawableSet) { foreach (string state in drawableSet.GetStates()) { foreach (GameDrawableInstance instance in drawableSet.GetByState(state)) { GameDrawableInstance copiedInstance = Add(state, instance.Drawable, instance._associatedGroup); copiedInstance.Layer = instance.Layer; copiedInstance.Offset = instance.Offset; copiedInstance.Rotation = instance.Rotation; copiedInstance.Visible = instance.Visible; } } }
/// <summary> /// Performs Set negation between this DrawableSet and the DrawabelSet specified in the parameter. While /// two sets should never share the same GameDrawableInstance, they may share the same IGameDrawable which would /// be wrapped by an GameDrawableInstance. If the DrawableSet specified in the parameter contains IGameDrawables /// within the same state as this DrawableSet, then associated GameDrawableInstance's are removed. /// </summary> public void Remove(DrawableSet drawableSet) { foreach (string state in drawableSet.GetStates()) foreach (GameDrawableInstance instance in drawableSet.GetByState(state)) Remove(instance.Drawable, state); }