For the game I'm working on, the player has the ability to throw certain items onto the battle board that can effect the AI. By way of example, one of the items is a decoy. If the player throws a decoy on the board, then for the number of actions the item is active (10 for a default decoy), the AI will move toward the decoy instead of the player.
Some AI will be effected by some items, and not by others. I'm looking for a nice clean way of handling getting the information of what Items are currently on the board to each AI to allow them handle the specific items that effect them. I'm thinking some sort of consumer pattern, where each enemy type can "subscribe" to the item types that effect them and get notified when ever any of those are on the board.
If anyone could point me to information on any kind of pattern that would handle this situation, that would be most appreciated. I'm writing the game in Java, but examples in any language are fine.
TrihexMember Since 17 Apr 2009
Offline Last Active Oct 18 2013 09:34 AM
- Group Members
- Active Posts 12
- Profile Views 1,907
- Submitted Links 0
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown