Example #1
0
 public void Select(int x, int y)
 {
     for (int i = 0; i < objectList.Count; i++)
     {
         InterfaceBaseObject interfaceBaseObject = objectList[i];
         if (interfaceBaseObject.HitTest(x, y))
         {
             if (interfaceBaseObject is SelectedFishDecorator)
             {
                 objectList[i] = (interfaceBaseObject as SelectedFishDecorator).original;
             }
             else
             {
                 objectList[i] = new SelectedFishDecorator(interfaceBaseObject);
             }
         }
     }
 }
Example #2
0
 public void Select(int x, int y)
 {
     for (int i = 0; i < objectList.Count; i++)
     {
         InterfaceBaseObject interfaceBaseObject = objectList[i];
         if (interfaceBaseObject.HitTest(x, y))
         {
             if (interfaceBaseObject is SelectedFishDecorator)
             {
                 objectList[i] = (interfaceBaseObject as SelectedFishDecorator).original;
             }
             else
             {
                 objectList[i] = new SelectedFishDecorator(interfaceBaseObject);
             }
         }
     }
 }