GetByState() публичный Метод

Returns all the DrawableInstances associated with the *state* specified in the parameter. If the group does not exist within this DrawableSet, a null value is returned.
public GetByState ( string state ) : HashSet
state string
Результат HashSet
Пример #1
0
 /// <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);
         }
     }
 }
Пример #2
0
 /// <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;
         }
     }
 }
Пример #3
0
 /// <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;
         }
     }
 }
Пример #4
0
 /// <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);
 }