示例#1
0
 public static PnjMenuHandler getInstance()
 {
     if (PnjMenuHandler.instance == null)
     {
         PnjMenuHandler.instance = new PnjMenuHandler();
     }
     return(PnjMenuHandler.instance);
 }
示例#2
0
        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();
        }