| blackjml ( @ 2006-09-13 14:04:00 |
Axiom Powerups Summarised
Thanks to idnar for this.
- Item is a subclass of Empowered, which has powerUp() and powerDown()
- You pass in another item (the "powerup") and an interface
- You can call item.powerupsFor(interface) and item.interfacesFor(powerup)
- Once you've done foo.powerUp(bar, IFoo), IFoo(foo) will give you bar
- If foo has many powerups implementing IFoo, IFoo(foo) gives you the first one returned (ordered by priority)
- However, you generally want either all IFoo powerups, or you don't want to have more than one IFoo powerup installed in the first place.
For more information, see the Axiom website.