- Home /
Moving an object from One list to another with a click.
I have a Card Class and a Deck Class. There are several instances of the Deck class, And When I run the program it Splays out the cards and I want to be able to click on a card and have it move from one deck (a List of Card types) to another. So it is not important for the card to physically move so I don't think a dragging type method is what I'm looking for but I can't figure out what to do. I was thinking of using the OnMouseDown() method but the problem I'm having is I can't think of a way to have that method in the card class and to have it used in the deck class. Sorry I'm new but is there like something obvious I'm missing or does anyone have a Idea of what to do? I can add any code but This seemed more like a design problem. Any help is appreciated