ShopEndEvent.java |
1 import java.awt.*; 2 import java.awt.event.*; 3 import java.applet.*; 4 import java.awt.geom.*; 5 import java.util.*; 6 7 /** 8 * Event for when Player leaves the Shop. 9 * 10 * @see Player 11 * @see Shop 12 * @see AWTEvent 13 * @author Matt, Sam 14 * @version 2.4.5.1 15 */ 16 public class ShopEndEvent extends AWTEvent 17 { 18 /** 19 * The player that was in the shop 20 */ 21 Player pl; 22 /** 23 * The constant associated with this event, must be unique in package/AWTEvent 24 */ 25 public static final int SHOP_ENDED = RESERVED_ID_MAX + 25; // Make sure no conflicts with normal AWT components 26 27 /** 28 * Construct a ShopEndEvent. 29 * 30 * @param source the Shop leaving from. 31 * @param id the AWTEvent ID associated with this. 32 * @param mpl the Player leaving the Shop. 33 * @see Player 34 * @see Shop 35 * @see AWTEvent 36 */ 37 ShopEndEvent(Shop source, int id, Player mp1) 38 { 39 super( source, id ); 40 pl = mp1; 41 } 42 /** 43 * Returns the Player in this. 44 * 45 * @return The Player in this. 46 */ 47 public Player getPlayer() 48 { 49 return pl; 50 } 51 } 52