Re: [vassalengine-devel] catching every GamePiece added to/moved on/removed from a map
Brought to you by:
rodneykinney,
uckelman
From: Rodney K. <rod...@co...> - 2007-05-30 19:59:53
|
> I wonder if it would be a good idea to have a 'location changed' listener > in Map Probably a good idea. You don't want to have to register a listener with each GamePiece, though, so listeners will want to register themselves with the Map. However, you also probably don't want to fire one event for each GamePiece that changes as the result of a user action (e.g. GlobalKeyCommand). You'll want to combine all those GamePiecePositionChanged events into a single event to fire. Could be a little tricky. A similar pattern is used in the Translate trait, where multiple piece movements are combined into a single Command. rk |