Пример #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);
             }
         }
     }
 }
Пример #2
0
 public BaseDecorator(InterfaceBaseObject original)
 {
     this.original = original;
 }
Пример #3
0
 public SelectedFishDecorator(InterfaceBaseObject interfaceBaseObject)
     : base(interfaceBaseObject)
 {
     visible = true;
 }
Пример #4
0
 public BaseDecorator(InterfaceBaseObject original)
 {
     this.original = original;
 }
Пример #5
0
 public SelectedFishDecorator(InterfaceBaseObject interfaceBaseObject) : base(interfaceBaseObject)
 {
     visible = true;
 }