Пример #1
0
 public static FightMenuHandler getInstance()
 {
     if (FightMenuHandler.instance == null)
     {
         FightMenuHandler.instance = new FightMenuHandler();
     }
     return(FightMenuHandler.instance);
 }
Пример #2
0
        public void handleTurn(Fighter target)
        {
            FightMenuHandler fmh = FightMenuHandler.getInstance();

            fmh.resetMenuItems();
            fmh.addMenuItem(new AttackMenuItem(this, target));
            fmh.addMenuItem(new FightInventoryMenuItem(this, target));
            fmh.hero     = this;
            fmh.opponent = target;
            fmh.showChoices();
        }