[messages] [Technical Support & Bugs] How do I "load" GamePieces in Java?
magnus.pihl at gmail.com
Sun Jan 13 12:54:37 MST 2013
I finally found a (somewhat roundabout) way of doing this. Here it is,
for the benefit of future generations:
First, you need to find the GamePiece Palette you wish to load Pieces
from. In my case, I could do this with the following:
List<PieceWindow> piecePalettes =
You can iterate over them, asking them for "getConfigureName()" if you
know what you're looking for, to get the right one.
Once you have the right palette (let's say we saved it in a variable
called palette), follow the same logic to get its PieceSlots:
List<PieceSlot> slots =
Now you can iterate over all your slots, asking each one for its
"getPiece()" and then querying the GamePieces for the correct one.
Once you have the Piece, you can add it to a map with
Read this topic online here:
More information about the messages