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