SaveEvent.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 fired when Player chooses to save his informaiont. 9 * 10 * @see SaveListener 11 * @see Shop 12 * @see Player 13 * @author Matt, Sam 14 * @version 7.3696 15 */ 16 public class SaveEvent extends AWTEvent 17 { 18 /** 19 * The Player to pass along 20 */ 21 Player pl; 22 /** 23 * The UID of SaveEvent 24 */ 25 public static final int SAVE_GAME = RESERVED_ID_MAX + 22; // Make sure no conflicts with normal AWT components 26 27 /** 28 * Constructs a new SaveEvent with Shop, id and Player. 29 * 30 * @see Shop 31 * @see Player 32 */ 33 SaveEvent(Shop source, int id, Player mp1) 34 { 35 super( source, id ); 36 pl = mp1; 37 } 38 /** 39 * Returns the Player to be saved. 40 * 41 * @return the Player to be saved. 42 */ 43 public Player getPlayer() 44 { 45 return pl; 46 } 47 } 48