public static PnjMenuHandler getInstance() { if (PnjMenuHandler.instance == null) { PnjMenuHandler.instance = new PnjMenuHandler(); } return(PnjMenuHandler.instance); }
public void makeAchoice() { this.talk(); PnjMenuItem accept = new PnjMenuItem("Accepter", this); PnjMenuItem deny = new PnjMenuItem("Refuser", this); PnjMenuHandler.getInstance().addItemToMenu(accept); PnjMenuHandler.getInstance().addItemToMenu(deny); PnjMenuHandler.getInstance().returnToMenu(); }