示例#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;
 }
 public SelectedFishDecorator(InterfaceBaseObject interfaceBaseObject)
     : base(interfaceBaseObject)
 {
     visible = true;
 }
示例#4
0
 public BaseDecorator(InterfaceBaseObject original)
 {
     this.original = original;
 }
 public SelectedFishDecorator(InterfaceBaseObject interfaceBaseObject) : base(interfaceBaseObject)
 {
     visible = true;
 }